When an adaptive card contains a submit button and input fields, I am unable to suppress the error message Object reference not set to an instance of an object.
Composer 1.2.2
N/A. Using Bot Framework Emulator
Windows
Steps to reproduce the behavior:
[Activity
Attachments = ${json(adaptivecard())}
]
lu string:-```{
"type": "AdaptiveCard",
"version": "1.0",
"body": [
{
"type": "TextBlock",
"text": "What is your name",
"size": "Large"
},
{
"type": "TextBlock",
"text": "Name"
},
{
"type": "Input.Text",
"id": "Name"
}
],
"actions": [
{
"type": "Action.Submit",
"title": "Submit",
"id": "Submit",
"data": {
"CardName": "<cardname>",
"UserAction": "<submit>"
}
},
{
"type": "Action.Submit",
"title": "Cancel",
"id": "Cancel",
"data": {
"CardName": "<cardname>",
"UserAction": "<cancel>"
}
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
}
Object reference not set to an instance of an object.The user should be able to post back the value without the error.
Question: How do I access the value that is posted back?
@jwiley84 just making sure this is on your radar. Please provide an update if possible.
@jwiley84, any update?
I am looking into this.
Hi @knightmeister I'm unable to reproduce this.
No error and it _is_ posting back:
"channelData": {
"postBack": true,
"clientActivityID": "1607638513976l0u4zwomjwp",
"clientTimestamp": "2020-12-10T22:15:13.976Z"
},
"value": {
"CardName": "<cardname>",
"UserAction": "<submit>",
"Name": "Dana"
}
I assume you do have the template name/identifier for the card (other wise should error in designer), but just to clarify, I'll share exactly what I have:
# SendActivity_e2eRW1()
[Activity
Attachments = ${json(adaptivecard())}
]
````
-{
"type": "AdaptiveCard",
"version": "1.0",
"body": [
{
"type": "TextBlock",
"text": "What is your name",
"size": "Large"
},
{
"type": "TextBlock",
"text": "Name"
},
{
"type": "Input.Text",
"id": "Name"
}
],
"actions": [
{
"type": "Action.Submit",
"title": "Submit",
"id": "Submit",
"data": {
"CardName": "<cardname>",
"UserAction": "<submit>"
}
},
{
"type": "Action.Submit",
"title": "Cancel",
"id": "Cancel",
"data": {
"CardName": "<cardname>",
"UserAction": "<cancel>"
}
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
}
````
Hi @knightmeister Any further findings on this? Anything I might have missed to be able to reproduce the issue?
Hi @knightmeister Any further findings on this? Anything I might have missed to be able to reproduce the issue?
I'll come back to you in the next day or so. Sorry for my delayed response.
Hey @knightmeister Just checking in again. Sill having this issue?
Closing due to inactivity. Please let us know if you are still having this issue and we can reopen if needed.
@dmvtech I find it ironic that I raised this issue and it sat there unattended for weeks - I'm on Christmas break and I will pick this up on January 7 when I return to work and let you know if it is still an issue then.