selectCheckBox

This page describes the select type with renderType='selectCheckBox'.

The select checkbox stores the values as comma separated values.

EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php
[
    'columns' => [
        'select_checkbox_7' => [
            'label' => 'select_checkbox_7',
            'description' => 'itemGroups',
            'config' => [
                'type' => 'select',
                'renderType' => 'selectCheckBox',
                'items' => [
                    [
                        'label' => 'foo 1',
                        'value' => 1,
                        'group' => 'group1',
                    ],
                    [
                        'label' => 'foo 2',
                        'value' => 2,
                        'icon' => 'EXT:styleguide/Resources/Public/Icons/tx_styleguide.svg',
                        'group' => 'group1',
                    ],
                    [
                        'label' => 'foo 3',
                        'value' => 3,
                        'icon' => 'EXT:styleguide/Resources/Public/Icons/tx_styleguide.svg',
                    ],
                    [
                        'label' => 'foo 4',
                        'value' => 4,
                    ],
                    [
                        'label' => 'foo 5',
                        'value' => 1,
                        'group' => 'group3',
                    ],
                ],
                'itemGroups' => [
                    'group1' => 'Group 1 with items',
                    'group2' => 'Group 2 with no items',
                    'group3' => 'Group 3 with items',
                ],
            ],
        ],
    ],
]
Copied!

The field in the database is of type text or varchar.