Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bot framework disable user input box

I am using the below code so that the user must choose Yes/No for an answer

PromptDialog.Confirm(context,confirmOption,"Are you sure?");

The confirmOption part, simply gives a response if Yes or No is pressed. Is it possible to disable the user input box in order to block the user from entering irrelevant text and enable it after choosing Yes/No?

like image 508
J-K Avatar asked May 17 '26 19:05

J-K


1 Answers

There is no such option in channels like Skype of Facebook Messenger, as you do not have access to the implementation.

But if you are using Prompts correctly the input of the user can be automatically compared to the options and validated even if it is not exactly the same value. You can also enable the fact that the user can say "the first one" or an equivalent and detect that as the 1st option.

In the case of a PromptConfirm, it will try to match several values, depending of the Locale. For example in English (see Resources file here):

  • For No, default values are: "No;n;nope;2

  • For Yes: "Yes;y;sure;ok;yep;1"

like image 143
Nicolas R Avatar answered May 19 '26 09:05

Nicolas R



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!