Toggle Picker

Prev Next

The Toggle Picker is a simple picker that allows users to switch between two choices. When users select the picker, nothing opens, but the choice will toggle.

Configuration Options

The picker can be configured through the following options:

Option

Type

Default

Description

items

array

[]

Array of items to choose from. Each item must include "id" and "title" and "isEnabled": true. Limit to two items

pickedItemId

string

""

id to select by default (required).

Example Configuration

{
  "id": "toggle_picker",
  "items": [
    {
      "id": "on",
      "isEnabled": true,
      "title": "On"
    },
    {
      "id": "off",
      "isEnabled": true,
      "title": "Off"
    }
  ],
  "pickedItemId": "on",
  "type": "toggle"
}

Default Query Params

The toggle picker generates the following params to the API Query:

Parameter

Type

Description

value

string

selected item id

Example request body:

"toggle_picker": {
  "pickerType": "toggle",
  "value": "on"
}

Page Link

Example mapping for page link.

Assigning the toggle as on

Example mapping for page link.

Assigning the toggle as on

Assigning the toggle as off

{
    "mapping": {
        'toggle': '"off"'
    }
}