Toggle checkbox

The checkbox with the renderType checkboxToggle renders as one or several toggle switches. As opposed to the Labeled toggle checkbox no additional labels for the states can be defined.

../../../_images/Checkbox17.png
../../../_images/Checkbox18.png

Its state can be inverted via invertStateDisplay.

Examples

Example: Single checkbox with toggle

../../../_images/Checkbox17.png
EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php
'columns' => [
    'checkbox_17' => [
        'exclude' => 1,
        'label' => 'checkbox_17',
        'description' => 'renderType=checkboxToggle single',
        'config' => [
            'type' => 'check',
            'renderType' => 'checkboxToggle',
            'items' => [
                [
                    0 => 'foo',
                    'labelChecked' => 'Enabled',
                    'labelUnchecked' => 'Disabled',
                ],
            ],
        ],
    ],
]

checkboxToggle: Instead of checkboxes, a toggle item is displayed.

Example: Single checkbox with toggle inverted state display

../../../_images/Checkbox18.png
EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php
'columns' => [
    'checkbox_18' => [
        'exclude' => 1,
        'label' => 'checkbox_18',
        'description' => 'renderType=checkboxToggle single inverted state display',
        'config' => [
            'type' => 'check',
            'renderType' => 'checkboxToggle',
            'items' => [
                [
                    0 => 'foo',
                    'labelChecked' => 'Enabled',
                    'labelUnchecked' => 'Disabled',
                    'invertStateDisplay' => true,
                ],
            ],
        ],
    ],
]

invertedStateDisplay: A checkbox is marked checked if the database bit is not set and vice versa.