Forum Discussion
VijayDev23
Jun 29, 2023Copper Contributor
Teams Action Card Action.Submit
const questionCard = require("../adaptiveCards/question.json");
//Code within a method that displays the adaptive card to the user
const cardAttachment = {
contentType: 'application/vnd.microsoft.card.adaptive',
content: questionCard,
};
const message = {
type: 'message',
attachments: [cardAttachment],
};
await context.sendActivity(message);
//Adaptive Card
//Adaptive Card
{
"type": "AdaptiveCard",
"version": "1.5",
"body": [
{
"type": "TextBlock",
"text": "Please enter your question below",
"style": "heading"
},
{
"type": "Input.Text",
"id": "question",
"placeholder": "Enter question here",
"maxLength": 500,
"isMultiline": true
}
],
"actions": [
{
"type": "Action.Submit",
"title": "OK"
"data":
}
]
}
I am trying to read in the users input after they click on the submit button? What information should I put in the data section of my Action.Submit button so that I can get the information that was typed into the input section. as well as how do i create an event listener either in the method I am displaying my card or a seperate method within that file that will process the
- Sayali-MSFTMicrosoftVijayDev23 - Thanks for reporting your issue.
We will check this at our end and will get back to you.- Sayali-MSFTMicrosoft
VijayDev23 - Please have look into this sample-https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/35d3f25654d8601813eeb06626c4ff0867e55718/samples/bot-adaptive-card-actions/nodejs
Hope it is helpful!!- Sayali-MSFTMicrosoftVijayDev23 - Did you get chance to check above sample?