Change Confirm Settings in botframework Formflow

I created a form in botframework. I want to change the confirmation settings, by default it accepts "Yes" and "No". but I want it to be “Yes” instead, even if the user enters “OK,” “I,” “Yes,” etc., how can I add parameters to confirm.

+4
source share
1 answer

You need to add new terms to Yesthe FormBuilder configuration array. Sort of:

public static IFormBuilder<T> CreateCustomForm<T>()
    where T : class
{
    var form = new FormBuilder<T>();
    var yesTerms = form.Configuration.Yes.ToList();
    yesTerms.Add("Ya");
    form.Configuration.Yes = yesTerms.ToArray();

    return form;
}

What you can use, for example:

 return CreateCustomForm<MyForm>()

The reason for this may be the following:

Confirmation type to bool. - , . Confirmation RecognizeBool.

Yes/No, ( .

Confirmation , ConfirmStep. ConfirmStep - , , .

+4

Source: https://habr.com/ru/post/1672904/


All Articles