chatbotadaptive-cardsbot-framework-composer

Bot Framework Composer - Adaptive card - Submit and Cancel Buttons


I have 2 buttons on the adaptive card, "Submit" and "Cancel"."Submit" brings me the information I entered on the form. but the "Cancel" button does the same. I want the "Cancel" button to redirect to another dialog when pressed. Any idea?

enter image description here


Solution

  • You can use the data property for this and then add a condition getting the value of turn.activity.value.id

            "actions": [
        {
            "type": "Action.Submit",
            "title": "Submit",
            "data": {
                "id": "submit"
            }
        },
        {
            "type": "Action.Submit",
            "title": "Cancel",
            "data": {
                "id": "cancel"
            }
        }
        ]