Can form flow fields in bot framework be pre-populated?

前端 未结 2 1532
名媛妹妹
名媛妹妹 2021-01-13 19:55

I have used formflow to ask several questions and to finally fill up a form. A unique id is generated and given to user at the end. Now using that unique id I want to edit t

2条回答
  •  伪装坚强ぢ
    2021-01-13 20:23

    Sure you can pre-populate the formflow fields Firstly you will look for the fields that you want to populate and then add them to the entity list

    I am using LUIS and if i find a suitable entity from my LUIS result i will add it to the form to be pre-populated.

     var entities = new List(result.Entities);
      if (entities.Any(e => e.Type == "IdNumber"))
            {
                entities.Add(new EntityRecommendation(type: "IdNumber") { Entity = entities.FirstOrDefault(e => e.Type == "IdNumber").Entity});
            }
    

    This will be done before you call your form to be built. Just make sure your "type" is the property name of your class. "Entity" will be the value

提交回复
热议问题