I am using BotFramework WebChat 4.9.1
and adaptive card 1.2
and I need few fields to be mandatory. Following is the card I have tried but it does not work. Ideally on submit it should highlight with red text that First name is required if the text box is empty.
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.2",
"body": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": 2,
"items": [
{
"type": "TextBlock",
"text": "Email Sign Up Form",
"weight": "Bolder",
"size": "Medium"
},
{
"type": "TextBlock",
"text": "You'll get timely email notification",
"isSubtle": true,
"wrap": true
},
{
"type": "Container",
"$data": "properties",
"items": [
{
"type": "TextBlock",
"text": "First Name*",
"weight": "Bolder",
"wrap": true
},
{
"type": "Input.Text",
"id": "firstName",
"placeholder": "First Name",
"Required": true,
"requiredMessage": "First Name is required"
},
{
"type": "TextBlock",
"text": "Last Name*",
"weight": "Bolder",
"wrap": true
},
{
"type": "Input.Text",
"id": "lastName",
"placeholder": "Last Name",
"Required": true,
"requiredMessage": "Last Name is required"
},
{
"type": "TextBlock",
"text": "Email*",
"weight": "Bolder",
"style": "email",
"wrap": true
},
{
"type": "Input.Text",
"id": "email",
"placeholder": "Your Email",
"Required": true,
"requiredMessage": "email is required"
},
{
"type": "TextBlock",
"text": "DOB*",
"weight": "Bolder",
"wrap": true
},
{
"type": "Input.Date",
"id": "dob",
"value": "2017-09-20",
"Required": true,
"requiredMessage": "Please select you date of birth"
}
]
}
]
}
]
}
],
"actions": [
{
"type": "Action.Submit",
"title": "Submit",
"data": {
"result": "submit"
}
}
]
}
The Json above you can try in Design You Adaptive Card Here Please select the Host app and Target Version from the designer tool. Please help.
Is it possible with adaptive card targeted for WebChat or this I'll have to achieve in front end?