How to Add a Multi-Line Text Box to an Adaptive Card
A one-line box is fine for a name, but feedback and notes need room. An Adaptive Card Input.Text becomes a taller box that takes several lines when you set isMultiline, and maxLength keeps the answer to a size your agent can handle.
Syntax
{
"type": "Input.Text",
"id": "<input id>",
"label": "<label>",
"isMultiline": true,
"maxLength": <most characters>,
"placeholder": "<hint shown while it's empty>"
}
| Part | What it does |
|---|---|
isMultiline | If true, allow multiple lines of input. |
maxLength | Hint of maximum length characters to collect (may be ignored by some clients). |
placeholder | Description of the input desired. Displayed when no text has been input. |
The descriptions are from Microsoft's Input.Text reference.
The Example
A training feedback card asks What should we change? in a multi-line box of up to 300 characters, with Up to 300 characters as its placeholder.
Prerequisites
- An agent that sends Adaptive Cards in Microsoft Teams and reads what a card's Submit button sends.
Step 1: Write the Card
{
"type": "AdaptiveCard",
"version": "1.5",
"body": [
{ "type": "TextBlock", "text": "Training feedback", "size": "Large", "weight": "Bolder" },
{
"type": "Input.Text",
"id": "comments",
"label": "What should we change?",
"isMultiline": true,
"maxLength": 300,
"placeholder": "Up to 300 characters"
}
],
"actions": [
{ "type": "Action.Submit", "title": "Send", "data": { "card": "feedback" } }
]
}

Step 2: Type Two Lines in Teams
Send the card from your agent, as How to Send an Adaptive Card in the Microsoft 365 Agents SDK in C# shows:

Type a line, press Enter, and type a second one. In a multi-line box, Enter starts a new line instead of sending:

Step 3: Send It
Select Send. The agent for this post replies with the values it receives:

{"card":"feedback","comments":"More practice time, please.\nThe room was too warm."}
The line break arrived as \n, a newline in the JSON string. When the agent shows the text again, in a card or a message, it can keep or replace those line breaks.
What maxLength Did in Teams
On a fresh card, I typed 310 characters into the box. It stopped taking them at 300: the text box in Teams carries the limit itself, as an HTML maxlength of 300, so the card never had more to send.
Common Mistakes
| Mistake | What happens | Do this instead |
|---|---|---|
No isMultiline for long answers | A one-line box | Set "isMultiline": true |
Trusting maxLength alone | It's a hint, and other apps may not enforce it | Check the length in the agent too |
Treating \n as two characters | It's one newline character in the string | Split or replace on \n |
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Typing stops before the end | The box reached maxLength | Raise maxLength, or say the limit in the placeholder |
FAQ
Can I prefill a multi-line box?
Yes, with value, as for any text box: How to Prefill the Inputs of an Adaptive Card.
Can I require an answer?
Yes, with "isRequired": true and an errorMessage: How to Make Adaptive Card Inputs Required.
Conclusion
For longer answers, give an Input.Text "isMultiline": true, a maxLength and a placeholder that says the limit. In Teams, Enter starts a new line, the box stops at maxLength, and the card sends the text with \n for each line break.
Additional Resources
- Input.Text, on Microsoft Learn.
- Input Validation, on Microsoft Learn.
