Cards alongside FormFlow
Hi,
I was wondering if Cards can be used alongside FormFlow (using the Dialog Flow of FormFlow except the adding customized cards for each Form Field?) If yes, can someone please point me to documentation related to it or any example using it?
Regards, Rohan
I believe you can use title/subtitle/image but not full cards:
https://github.com/Microsoft/BotBuilder/commit/e06eb46e5aaaa816fda31eb120871e0d63cd3132
@msft-shahins @chrimc62 can you use cards in FormFlow?
By default the extended information in DescribeAttribute should generate cards for you. You can also override the IFormBuilder.Prompter with your own implementation of PromptAsyncDelegate which can do any mapping you like.
Hi I'm very new to bot framework.
We wanted to add custom cards in our formflow. Is there any guide to do that.
So far I've trace PromptAsyncDelegate but I do not know what to do next.
form.Prompter = new PromptAsyncDelegate(IDialogContext Context, FormPrompt Microsoft.Bot.Builder.Dialogs.Internals.Prompt, T State, IField < T > File) => { };
Am I doing this right?
Appreciate your expertise.
You should probably not need to replace the prompter unless you need to do some kind of custom card generation. Just look at the attributes of DescribeAttribute and fill those in appropriately, i.e.
[Describe(Image=
If you did need to replace the prompter, in your builder you should call .Prompter(
Appreciate your quick response.
Yes I'm trying to create a custom card that can run through the form flow.
I get an error trying to use that in the prompter, is seem to get alot of errors.
FormBuilder<UserProfileForm> formbuilder = new FormBuilder<UserProfileForm>();
formbuilder.Prompter(async (context, prompt, state, field) =>
{
var preamble = context.MakeMessage();
var promptMessage = context.MakeMessage();
if (prompt.GenerateMessages(preamble, promptMessage))
{
await context.PostAsync(preamble);
}
await context.PostAsync(promptMessage);
return prompt;
});
@nitecloack can you open a new issue with the error you see? feel free to reference this issue.
What's the status for this? Can we display cards using FORM Flow? I wanted to show a card when i ask for confirmation, Is that possible?
@rohantare Are you still trying to set this up? I set this up for my own bot the other day.
@Tapptastic can you post your implementation as it may help others?
@Tapptastic @rohantare Were you able to display a card or an image in the .Confirm of the FormBuilder? I can't figure it out
@XopherDesign Let me find my implementation for you and post the code :)
Thanks @Tapptastic looking forward to it :)
@Tapptastic - I don't see a follow on comment here with your implementation. Can you please post the link? Thanks!