How to Prefill the Inputs of an Adaptive Card
A form that changes something people already have, such as their contact details, should open with what's there now. Every Adaptive Card input has a value property for that: the card shows it, people change what they need, and Submit sends the rest as it was.
Syntax
{ "type": "Input.Text", "id": "<input id>", "value": "<text>" }
{ "type": "Input.Number", "id": "<input id>", "value": <number> }
{ "type": "Input.ChoiceSet", "id": "<input id>", "value": "<a choice's value>", "choices": [ ... ] }
{ "type": "Input.Toggle", "id": "<input id>", "title": "<text>", "value": "<valueOn or valueOff>" }
| Input | value is |
|---|---|
Input.Text | The initial value for this field., as text |
Input.Number | Initial value for this field., as a number |
Input.ChoiceSet | The initial choice (or set of choices) that should be selected.: a choice's value, not its title |
Input.Toggle | The initial selected value. On when it equals valueOn, which is "true" unless you set it |
The descriptions are from Microsoft's Adaptive Cards schema. The Input.Toggle page puts it this way: If you want the toggle to be initially on, set this to the value of valueOn's value.
The Example
A contact details card opens with a phone number, +1 555 0100, and a ticked Send me text messages toggle, and has a Save button.
Prerequisites
- An agent that sends Adaptive Cards in Microsoft Teams and reads what a card's Submit button sends.
Step 1: Write the Card with Values
{
"type": "AdaptiveCard",
"version": "1.5",
"body": [
{ "type": "TextBlock", "text": "Your contact details", "size": "Large", "weight": "Bolder" },
{ "type": "Input.Text", "id": "phone", "label": "Phone number", "value": "+1 555 0100" },
{ "type": "Input.Toggle", "id": "texts", "title": "Send me text messages", "value": "true" }
],
"actions": [
{ "type": "Action.Submit", "title": "Save", "data": { "card": "phone" } }
]
}

"value": "+1 555 0100"fills the text box."value": "true"turns the toggle on, because"true"is itsvalueOn.
Step 2: Open It in Teams
Send the card from your agent, as How to Send an Adaptive Card in the Microsoft 365 Agents SDK in C# shows:

Both inputs open with their values. In Teams, the toggle shows as a checkbox.
Step 3: Save Without Changing Anything
Select Save. The agent for this post replies with the values it receives:

{"card":"phone","phone":"+1 555 0100","texts":"true"}
The prefilled values went back as they were, as text: the toggle sent "true", its valueOn.
Common Mistakes
| Mistake | What happens | Do this instead |
|---|---|---|
Setting a toggle's value to something other than its valueOn and expecting it on | The schema turns it on only for valueOn's value | Use the valueOn text, "true" by default |
| Expecting only changed fields back | Every input sends its value, changed or not | Compare with the old values in the agent, if it matters |
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| The toggle opens off | value isn't exactly valueOn | Use the same text in both |
FAQ
How does the agent fill in the current values?
It builds the card in code, or edits a JSON template, before sending it, putting each current value in value. Card values come back as text, and the schema's value for an Input.Number is a number, so parse it back first.
Can I prefill a form in a Teams dialog?
Yes. The dialog's card is an Adaptive Card like any other, and its inputs take value the same way: How to Show an Error in a Teams Dialog in the Microsoft 365 Agents SDK in C# sends a form back with what was typed.
Conclusion
To prefill an Adaptive Card, set each input's value: text for Input.Text, a number for Input.Number, a choice's value for Input.ChoiceSet, and the valueOn text for a toggle that should start on. Submit sends every value, changed or not.
Additional Resources
- Input.Text, on Microsoft Learn.
- Input.Toggle, on Microsoft Learn.
- Input.ChoiceSet, on Microsoft Learn.
