Input.Text

Input.Text collects text from the user,

Property Type Required Description
id string Yes Id for the value (will be used to identify collected input when SUBMIT is clicked)
isMultiline boolean No Do you want to allow multiple lines of input
maxLength number No hint of maximum length characters to collect (may be ignored by some clients)
placeholder string No Title Description of the input desired
style string No Style hint for Input.Text.
type "Input.Text" No Input.Text
value string No The initial value for a field
spacing string No Controls the amount of spacing between this element and the previous element.
separator boolean No, default: false The Separator object type describes the look and feel of a separation line between two elements.

Example

{
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "type": "AdaptiveCard",
    "version": "1.0",
    "body": [
        {
            "type": "TextBlock",
            "text": "Default text input"
        },
        {
            "type": "Input.Text",
            "id": "input1",
            "placeholder": "enter comment",
            "maxLength": 500
        },
        {
            "type": "TextBlock",
            "text": "Multiline text input"
        },
        {
            "type": "Input.Text",
            "id": "input2",
            "placeholder": "enter comment",
            "maxLength": 500,
            "isMultiline": true
        },
        {
            "type": "TextBlock",
            "text": "Pre-filled value"
        },
        {
            "type": "Input.Text",
            "id": "input3",
            "placeholder": "enter comment",
            "maxLength": 500,
            "isMultiline": true,
            "value": "This value was pre-filled"
        }
    ],
    "actions": [
        {
            "type": "Action.Submit",
            "title": "OK"
        }
    ]
}
{ "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "type": "AdaptiveCard", "version": "1.0", "body": [ { "type": "TextBlock", "text": "Default text input" }, { "type": "Input.Text", "id": "input1", "placeholder": "enter comment", "maxLength": 500 }, { "type": "TextBlock", "text": "Multiline text input" }, { "type": "Input.Text", "id": "input2", "placeholder": "enter comment", "maxLength": 500, "isMultiline": true }, { "type": "TextBlock", "text": "Pre-filled value" }, { "type": "Input.Text", "id": "input3", "placeholder": "enter comment", "maxLength": 500, "isMultiline": true, "value": "This value was pre-filled" } ], "actions": [ { "type": "Action.Submit", "title": "OK" } ] }
Try it Yourself »

Properties

id

Id for the value (will be used to identify collected input when SUBMIT is clicked)

  • Type: string
  • Required: Yes

isMultiline

Do you want to allow multiple lines of input

  • Type: boolean
  • Required: No

maxLength

hint of maximum length characters to collect (may be ignored by some clients)

  • Type: number
  • Required: No

placeholder

Title Description of the input desired

  • Type: string
  • Required: No

style

Style hint for Input.Text.

  • Type: string
  • Required: No
  • Allowed values:
    • "text"
    • "tel"
    • "url"
    • "email"

Example

{
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "type": "AdaptiveCard",
    "version": "1.0",
    "body": [
        {
            "type": "TextBlock",
            "text": "Specify the type of text being requested"
        },
        {
            "type": "Input.Text",
            "id": "myComment",
            "placeholder": "text",
            "style":"text"
        },
        {
            "type": "TextBlock",
            "text": "style: email"
        },
        {
            "type": "Input.Text",
            "id": "myEmail",
            "placeholder": "email",
            "style":"email"
        },
        {
            "type": "TextBlock",
            "text": "style: tel"
        },
        {
            "type": "Input.Text",
            "id": "myTel",
            "placeholder": "tel",
            "style":"tel"
        },
        {
            "type": "TextBlock",
            "text": "style: url"
        },
        {
            "type": "Input.Text",
            "id": "myUrl",
            "placeholder": "url",
            "style":"url"
        }
    ],
    "actions": [
        {
            "type": "Action.Submit",
            "title": "OK"
        }
    ]
}
{ "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "type": "AdaptiveCard", "version": "1.0", "body": [ { "type": "TextBlock", "text": "Specify the type of text being requested" }, { "type": "Input.Text", "id": "myComment", "placeholder": "text", "style":"text" }, { "type": "TextBlock", "text": "style: email" }, { "type": "Input.Text", "id": "myEmail", "placeholder": "email", "style":"email" }, { "type": "TextBlock", "text": "style: tel" }, { "type": "Input.Text", "id": "myTel", "placeholder": "tel", "style":"tel" }, { "type": "TextBlock", "text": "style: url" }, { "type": "Input.Text", "id": "myUrl", "placeholder": "url", "style":"url" } ], "actions": [ { "type": "Action.Submit", "title": "OK" } ] }
Try it Yourself »

type

Input.Text

  • Type: "Input.Text"
  • Required: No
  • Allowed values:
    • Input.Text

value

The initial value for a field

  • Type: string
  • Required: No

spacing

Controls the amount of spacing between this element and the previous element.

  • Type: string
  • Required: No
  • Allowed values:
    • "none"
    • "small"
    • "default"
    • "medium"
    • "large"
    • "extraLarge"
    • "padding"

separator

The Separator object type describes the look and feel of a separation line between two elements.

  • Type: boolean
  • Required: No, default: false