.. include:: /Includes.rst.txt .. _field_type_toggle: ====== Toggle ====== The "Toggle" type generates a number of checkbox fields with toggles. It corresponds with the TCA `type='check'` (checkboxToggle). Properties ========== .. rst-class:: dl-parameters default :sep:`|` :aspect:`Required:` false :sep:`|` :aspect:`Type:` string :sep:`|` :aspect:`Default:` '' :sep:`|` Default value set if a new record is created. items :sep:`|` :aspect:`Required:` true :sep:`|` :aspect:`Type:` array :sep:`|` :aspect:`Default:` '' :sep:`|` 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: .. code-block:: yaml items: 'one': 'The first' 'two': 'The second' 'three': 'The third' required :sep:`|` :aspect:`Required:` false :sep:`|` :aspect:`Type:` boolean :sep:`|` :aspect:`Default:` 'false' :sep:`|` If set, the field will become mandatory.