FormOptions New Enum Value Required
With the FormOptions None and PromptFieldsWithValues the user have to trigger the dialog start. It would be nice if we can use a new option PromptFieldsWithValuesInStart, that the user doesn't have to trigger the dialog start with an unnecessary message to the bot
Microsoft.Bot.Builder.cs
if (this._options.HasFlag(FormOptions.PromptInStart) || this._options.HasFlag(FormOptions.PromptFieldsWithValuesInStart)) { await MessageReceived(context, null); } else { context.Wait(MessageReceived); }
@willportnoy, thoughts?
@kevinport are you suggesting that leveraging the flag nature of the enum when calling FormDialog doesn't do what you want?
i.e. FormOptions.PromptInStart | FormOptions.PromptFieldsWithValues
@willportnoy Your suggestion FormOptions.PromptInStart | FormOptions.PromptFieldsWithValues workes perfectly. In this case we don't need to extend the FormOptions Enum.
In my opinion both solutions will work, and the user doesn't have to trigger the dialogstart with an unnecessary message to the bot.
Thank you :+1: when is this feature available?
One note for clarification:
works
if (this._options.HasFlag(FormOptions.PromptInStart) || this._options.HasFlag(FormOptions.PromptFieldsWithValues)) { await MessageReceived(context, null); } else { context.Wait(MessageReceived); }
doesn't work:
if (this._options.HasFlag(FormOptions.PromptInStart | FormOptions.PromptFieldsWithValues)) { await MessageReceived(context, null); } else { context.Wait(MessageReceived); }
@kevinport I wasn't sure about the resolution of this thread - are you suggesting a code change is needed in FormFlow to check both flags?
Yes i am suggestioning a code change in formflow.
because if you use "PromptFieldsWithValues" you have to send an unnessensary message to the bot to start the conversation.
@chrimc62 what do you think?
The current functionality seems fine.
@chrimc62
Can you tell me how to use the option "PromtFieldsWithValues"?
In my case the dialog did Not Start until you send a Message the bot. If you doesnt know this, the user thinks the bot got an error.
@kleeporten you would normally use FormOptions.PromptInStart to have the form dialog prompt in start.
@willportnoy
Yes, that makes sense. But if you want a Dialog which asked all already filled fields in my Form i Need To use the Option "PromtFieldsWithValues"?
But with this option the Dialog did mit start.
So Please Tell me how I can start an Dialoge which asks all already filled fields?????
This is indeed a bug. Thanks for bringing this to our attention--sorry it took so long to figure out the issue. The next release should have a fix.
You're welcome.
Thank you, for the fix. I will test it later.
@kevinport, I'm closing this issue as fixed, please reopen it if it's not the case. Thanks for reporting the bug!
I'am so sorry, i was very busy.......
Now our two bots are up to date.... there were some other changes in the framework due to that i have to rebuild my processes which took a bit of time.... (I will open a new issue...)
If i start my Form with these options FormOptions.PromptFieldsWithValues | FormOptions.PromptInStart every thing works fine.
Thank you 👍