Attention
TYPO3 v11 has reached end-of-life as of October 31th 2024 and is no longer being maintained. Use the version switcher on the top left of this page to select documentation for a supported version of TYPO3.
Need more time before upgrading? You can purchase Extended Long Term Support (ELTS) for TYPO3 v10 here: TYPO3 ELTS.
cols
cols
-
- Type
- integer/string
- Path
- $GLOBALS['TCA'][$table]['columns'][$field]['config']
- Scope
- Display
In how many columns the checkboxes will be shown. Makes sense only if the 'items' property is defining multiple checkboxes.
Allowed values are 1, 2, 3, ..., 31 or
inline
, 1 being default. If set toinline
the checkboxes are "floating" and there will be as many in one row as fits to browser width.Note checkboxes will still wrap if browser width is not sufficient.
Examples
Fixes columns
[
'columns' => [
'checkbox_2' => [
'exclude' => 1,
'label' => 'checkbox_2',
'description' => 'one checkbox with label',
'config' => [
'type' => 'check',
'items' => [
[
'foo',
],
],
],
],
],
]
Inline columns
[
'columns' => [
'checkbox_16' => [
'exclude' => 1,
'label' => 'checkbox_16',
'description' => 'cols=inline',
'config' => [
'type' => 'check',
'items' => [
[
'Mo',
],
[
'Tu',
],
[
'We',
],
[
'Th',
],
[
'Fr',
],
[
'Sa',
],
[
'Su',
],
],
'cols' => 'inline',
],
],
],
]