Search code examples
botframeworkmicrosoft-teams

Form with Method = "POST" doesn't render in Task Module MS Teams


I am building a bot, that would display custom forms in task modules. We are using .Net Core 3.1 and Bot Framework 4.6.

Issue:

I am unable to get a custom form to display in Task Module. It's a form with few input elements and with method="POST" attribute. When I remove "method" attribute the task module displays custom form correctly. I just want to post input field values to the ViewModel.

When I run the same page with method="post" in browser, I am able to render the page and forward the data to other pages

With Method="Post":

.cshtml page with

enter image description here

Task Module:

enter image description here

Without method="POST" :

enter image description here

Task Module:

without method="post" the page displays correctly, but can't post data to other page.

enter image description here


Solution

  • Once you submit the data in task module form. Your bot will receive task/submit invoke request with the data you have filled in form. You can respond the invoke request with other task module if you want this is what we call chaining in task module. Please take a look at submitting the result of task module