exclusiveKeys

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' => [
            'exclude' => 1,
            'label' => 'select_multiplesidebyside_2 exclusiveKeys=1,2',
            'config' => [
                'type' => 'select',
                'renderType' => 'selectMultipleSideBySide',
                'items' => [
                    [
                        'two exclusive items',
                        '--div--',
                    ],
                    [
                        'foo 1',
                        1,
                    ],
                    [
                        'foo 2',
                        2,
                    ],
                    [
                        'casual multiple items',
                        '--div--',
                    ],
                    [
                        'foo 3',
                        3,
                    ],
                    [
                        'foo 4',
                        4,
                    ],
                    [
                        'foo 5',
                        5,
                    ],
                    [
                        'foo 6',
                        6,
                    ],
                ],
                'multiple' => true,
                'exclusiveKeys' => '1,2',
            ],
        ],
    ],
]
Copied!