# Relevant Cardscript iconInput.Choice

Cardscript

Describes a choice for use in a ChoiceSet.

# Example

{
  "type": "AdaptiveCard",
  "body": [
    {
      "type": "Input.ChoiceSet",
      "id": "choice",
      "spacing": "medium",
      "value": "CHOICE_1",
      "choices": [
        {
          "title": "Choice 1",
          "value": "CHOICE_1"
        },
        {
          "title": "Choice 2",
          "value": "CHOICE_2"
        },
        {
          "title": "Choice 3",
          "value": "CHOICE_3"
        }
      ],
      "style": "expanded"
    }
  ],
  "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
  "version": "1.0"
}

# Required properties

# title

Text to display.

  • Type: string

# value

The raw value for the choice. NOTE: do not use a , in the value, since a ChoiceSet with isMultiSelect set to true returns a comma-delimited string of choice values.

  • Type: string

# Optional properties

# type

  • Type: string
  • Values:
    • Input.Choice

# icon

Name of an icon to display for the choice.

  • Type: string

# JSON Schema

{
  "type": "Input.Choice",
  "description": "Describes a choice for use in a ChoiceSet.",
  "additionalProperties": true,
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "Input.Choice"
      ]
    },
    "title": {
      "type": "string",
      "description": "Text to display."
    },
    "icon": {
      "type": "string",
      "description": "Name of an icon to display for the choice."
    },
    "value": {
      "type": "string",
      "description": "The raw value for the choice. **NOTE:** do not use a `,` in the value, since a `ChoiceSet` with `isMultiSelect` set to `true` returns a comma-delimited string of choice values."
    }
  },
  "required": [
    "title",
    "value"
  ],
  "typeSafe": "input-choice",
  "example": "FIXME!",
  "propertySummary": [
    {
      "name": "type",
      "type": "string",
      "required": "Optional"
    },
    {
      "name": "title",
      "type": "string",
      "required": "Required",
      "text": "Text to display."
    },
    {
      "name": "icon",
      "type": "string",
      "required": "Optional",
      "text": "Name of an icon to display for the choice."
    },
    {
      "name": "value",
      "type": "string",
      "required": "Required",
      "text": "The raw value for the choice. **NOTE:** do not use a `,` in the value, since a `ChoiceSet` with `isMultiSelect` set to `true` returns a comma-delimited string of choice values."
    }
  ]
}
Last Updated: 9/10/2023, 11:30:14 AM