how do you make an adaptive card input choice selection send the selected choice to the teams bot?

43 Views Asked by At

I am working on a MS teams bot project using Bot framework sdk 4.0 and Node JS. I have an adaptive card with 3 input choices for the user to select but the values for the 2nd and consecutively the 3rd input choice set will only be populated based on the previous selections. enter image description here

I am trying to do this without the use of a button.That is, i want the data to be submitted for each of the input choices when the user selects the choices itself. is there any way to invoke a submit action when an input choice is selected without the use of a button or is there any way to trigger the click on a button when each of the input choice is selected? I have searched for a solution to this for a long time, any help in the right direction is greatly appreciated!

1

There are 1 best solutions below

2
Hilton Giesenow On

Adaptive Cards, while serving some excellent use cases, are -very- constrained in terms of flexibility (it's by design, but it's really easy to run into the edges). In this case, it's not possible to send anything back without a Submit button, which will send the entire payload (all form fields).

I'd suggest going Adaptive Cards as they're very well supported in Teams, but if you -really- want (need?) a much more advanced UI, you can also consider a Task Module (basically launching a web UI in an iframe).