Hello Cognigy Community,
I've followed instructions and used and modified the templates to build an input form with validation into my bot.
The problem is the 'isRequired' and 'errorMessage' functions aren't triggering the expected behaviour. I.e. it's letting me submit the form even when the fields in question are left empty and no error message is displaying.
Does anyone know if this is a bug or if I'm missing something here:
{
"_plugin":{
"type":"adaptivecards",
"payload":{
"$schema":"http://adaptivecards.io/schemas/adaptive-card.json",
"type":"AdaptiveCard",
"version":"1.3",
"body":[
{
"type":"TextBlock",
"text":"Given Name",
"wrap":true
},
{
"type":"Input.Text",
"style":"text",
"id":"firstname",
"isRequired":true,
"errorMessage":"Name is required",
"value":"{{profile.firstname}}"
},
{
"type":"TextBlock",
"text":"Family Name",
"wrap":true
},
{
"type":"Input.Text",
"style":"text",
"id":"lastname",
"value":"{{profile.lastname}}"
},
{
"type":"TextBlock",
"text":"Email",
"wrap":true
},
{
"type":"Input.Text",
"style":"text",
"id":"email",
"value":"{{profile.email}}"
},
{
"type":"TextBlock",
"text":"Company Name",
"wrap":true
},
{
"type":"Input.Text",
"style":"text",
"id":"company_name",
"value":"{{profile.company_name}}"
}
],
"actions":[
{
"type":"Action.Submit",
"title":"Submit",
"id":"submit"
}
]
}
}
}
Comments
1 comment