Toggle

The "Toggle" type generates a number of checkbox fields with toggles.

It corresponds with the TCA type='check' and renderType='checkboxToggle'.

Properties

default

| Required: false | Type: string | Default: '' |

Default value set if a new record is created.

items

| Required: true | Type: array | Default: '' |

Contains the toggle elements. Each item is an array with the first being the value transferred to the input field, and the second being the label in the select drop-down (LLL reference possible).

Example:

items:
  'one': 'The first'
  'two': 'The second'
  'three': 'The third'
invertStateDisplay

| Required: false | Type: boolean | Default: '' |

Inverts the display state (onf/off) of the toggle items.

Example:

invertStateDisplay: true

Example

group: common
fields:
  - identifier: toggleInverted
    type: Toggle
    properties:
      default: 'one'
      items:
        'one': 'The first'
        'two': 'The second'
        'three': 'The third'
      invertStateDisplay: true