Schema Explorer

Choose element:

Input.Text

Lets a user enter text.

Property Type Required Description Version
type "Input.Text" Yes Must be "Input.Text". 1.0
id string Yes Unique identifier for the value. Used to identify collected input when the Submit action is performed. 1.0
isMultiline boolean No If true, allow multiple lines of input. 1.0
maxLength number No Hint of maximum length characters to collect (may be ignored by some clients). 1.0
placeholder string No Description of the input desired. Displayed when no text has been input. 1.0
style TextInputStyle No 1.0
inlineAction ISelectAction No The inline action for the input. Typically displayed to the right of the input. It is strongly recommended to provide an icon on the action (which will be displayed instead of the title of the action). 1.2
value string No The initial value for this field. 1.0

Inherited properties

Property Type Required Description Version
fallback Element, FallbackOption No Describes what to do when an unknown element is encountered or the requires of this or any children can’t be met. 1.2
height BlockElementHeight No Specifies the height of the element. 1.1
separator boolean No When true, draw a separating line at the top of the element. 1.0
spacing Spacing No Controls the amount of spacing between this element and the preceding element. 1.0
isVisible boolean No, default: true If false, this item will be removed from the visual tree. 1.2
requires Dictionary<string> No A series of key/value pairs indicating features that the item requires with corresponding minimum version. When a feature is missing or of insufficient version, fallback is triggered. 1.2

Example

JSON
{
	"$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"
		}
	]
}
Adaptive Card
{ "$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" } ] }

Properties

isMultiline

If true, 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

Description of the input desired. Displayed when no text has been input.

  • Type: string
  • Required: No

style

  • Type: TextInputStyle
  • Required: No
  • Allowed values:
    • "text"
    • "tel"
    • "url"
    • "email"
JSON
{
	"$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"
		}
	]
}
Adaptive Card
{ "$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" } ] }

inlineAction

The inline action for the input. Typically displayed to the right of the input. It is strongly recommended to provide an icon on the action (which will be displayed instead of the title of the action).

  • Type: ISelectAction
  • Version : 1.2
  • Required: No
  • Allowed values:
    • Action.OpenUrl
    • Action.Submit
    • Action.ToggleVisibility
JSON
{
	"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
	"type": "AdaptiveCard",
	"version": "1.2",
	"body": [
		{
			"type": "TextBlock",
			"text": "Text input with an inline action"
		},
		{
			"type": "Input.Text",
			"id": "input1",
			"inlineAction": {
				"type": "Action.Submit",
				"iconUrl": "http://adaptivecards.io/content/cats/1.png",
				"title": "Reply"
			}
		},
		{
			"type": "TextBlock",
			"text": "Text input with an inline action with no icon",
			"wrap": true
		},
		{
			"type": "Input.Text",
			"id": "input2",
			"inlineAction": {
				"type": "Action.OpenUrl",
				"title": "Reply",
				"url": "http://adaptivecards.io"
			}
		},
		{
			"type": "TextBlock",
			"text": "Multiline Text Inputs with inline actions"
		},
		{
			"type": "Input.Text",
			"id": "input3",
			"isMultiline": true,
			"inlineAction": {
				"type": "Action.Submit",
				"iconUrl": "http://adaptivecards.io/content/cats/1.png",
				"title": "Reply"
			}
		},
		{
			"type": "Input.Text",
			"id": "input4",
			"isMultiline": true,
			"inlineAction": {
				"type": "Action.OpenUrl",
				"title": "Reply",
				"url": "http://adaptivecards.io"
			}
		}
	]
}
Adaptive Card
{ "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "type": "AdaptiveCard", "version": "1.2", "body": [ { "type": "TextBlock", "text": "Text input with an inline action" }, { "type": "Input.Text", "id": "input1", "inlineAction": { "type": "Action.Submit", "iconUrl": "http://adaptivecards.io/content/cats/1.png", "title": "Reply" } }, { "type": "TextBlock", "text": "Text input with an inline action with no icon", "wrap": true }, { "type": "Input.Text", "id": "input2", "inlineAction": { "type": "Action.OpenUrl", "title": "Reply", "url": "http://adaptivecards.io" } }, { "type": "TextBlock", "text": "Multiline Text Inputs with inline actions" }, { "type": "Input.Text", "id": "input3", "isMultiline": true, "inlineAction": { "type": "Action.Submit", "iconUrl": "http://adaptivecards.io/content/cats/1.png", "title": "Reply" } }, { "type": "Input.Text", "id": "input4", "isMultiline": true, "inlineAction": { "type": "Action.OpenUrl", "title": "Reply", "url": "http://adaptivecards.io" } } ] }

value

The initial value for this field.

  • Type: string
  • Required: No

id

Unique identifier for the value. Used to identify collected input when the Submit action is performed.

  • Type: string
  • Required: Yes

fallback

Describes what to do when an unknown element is encountered or the requires of this or any children can't be met.

  • Type: Element, FallbackOption
  • Version : 1.2
  • Required: No
  • Allowed values:
    • ActionSet
    • ColumnSet
    • Container
    • FactSet
    • Image
    • ImageSet
    • Input.ChoiceSet
    • Input.Date
    • Input.Number
    • Input.Text
    • Input.Time
    • Input.Toggle
    • Media
    • RichTextBlock
    • TextBlock
    • "drop": Causes this element to be dropped immediately when unknown elements are encountered. The unknown element doesn't bubble up any higher.

height

Specifies the height of the element.

  • Type: BlockElementHeight
  • Version : 1.1
  • Required: No
  • Allowed values:
    • "auto": The height of the container will be determined by the height of its contents.
    • "stretch": The container will stretch its height to the available remaining height of the parent container.

separator

When true, draw a separating line at the top of the element.

  • Type: boolean
  • Required: No

spacing

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

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

isVisible

If false, this item will be removed from the visual tree.

  • Type: boolean
  • Version : 1.2
  • Required: No, default: true

requires

A series of key/value pairs indicating features that the item requires with corresponding minimum version. When a feature is missing or of insufficient version, fallback is triggered.

  • Type: Dictionary<string>
  • Version : 1.2
  • Required: No