exclusiveKeys

exclusiveKeys
Type
string (list of)
Path
$GLOBALS['TCA'][$table]['columns'][$field]['config']
Scope
Display / Proc.
RenderType
all

List of keys that exclude any other keys in a select box where multiple items could be selected.

Examples

Side-by-side select with two exclusive items

EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php
[
    'columns' => [
        'select_multiplesidebyside_2' => [
            'label' => 'select_multiplesidebyside_2 exclusiveKeys=1,2',
            'config' => [
                'type' => 'select',
                'renderType' => 'selectMultipleSideBySide',
                'items' => [
                    [
                        'label' => 'two exclusive items',
                        'value' => '--div--',
                    ],
                    [
                        'label' => 'foo 1',
                        'value' => 1,
                    ],
                    [
                        'label' => 'foo 2',
                        'value' => 2,
                    ],
                    [
                        'label' => 'casual multiple items',
                        'value' => '--div--',
                    ],
                    [
                        'label' => 'foo 3',
                        'value' => 3,
                    ],
                    [
                        'label' => 'foo 4',
                        'value' => 4,
                    ],
                    [
                        'label' => 'foo 5',
                        'value' => 5,
                    ],
                    [
                        'label' => 'foo 6',
                        'value' => 6,
                    ],
                ],
                'multiple' => true,
                'exclusiveKeys' => '1,2',
            ],
        ],
    ],
]
Copied!