Search code examples
node.jsazure-bot-serviceadaptive-cards

After submit, Adaptive cards are not retaining value of text entered in text box - in Web chat


For web chat, I am using a simple adaptive card.

{
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "type": "AdaptiveCard",
    "version": "1.0",
    "body": [
        {
            "type": "ColumnSet",
            "columns": [
                {
                    "type": "Column",
                    "width": 2,
                    "items": [
                        {
                            "type": "TextBlock",
                            "text": "Please enter the email id",
                            "weight": "Bolder",
                            "size": "Medium"
                        },
                        {
                            "type": "Input.Text",
                            "placeholder": "[email protected]",
                            "id": "e_mail_id"
                        }
                    ]
                }
            ]
        }
    ],
    "actions": [
        {
            "type": "Action.Submit",
            "title": "Submit"
        }
    ]
}

On submit, it does desirable job at the back end but the value entered in text box in adaptive card disappears. How can we retain the values in adaptive cards after submit action is called?


Solution

  • It was an issue with front end. Had to update Web chat from version 4.5.2 to 4.6.0 . Seems like this issue is a fix in the recent version of web chat.