Forum Discussion

VijayDev23's avatar
VijayDev23
Copper Contributor
Jun 29, 2023

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
{
"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 

Resources