cols¶
- cols¶
- Path
$GLOBALS['TCA'][$table]['columns'][$field]['config']
- Type
integer/string
- 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¶

EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php¶
[
'columns' => [
'checkbox_2' => [
'label' => 'checkbox_2',
'description' => 'one checkbox with label',
'config' => [
'type' => 'check',
'items' => [
[
'label' => 'foo',
],
],
],
],
],
]
Inline columns¶

EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php¶
[
'columns' => [
'checkbox_16' => [
'label' => 'checkbox_16',
'description' => 'cols=inline',
'config' => [
'type' => 'check',
'items' => [
[
'label' => 'Mo',
],
[
'label' => 'Tu',
],
[
'label' => 'We',
],
[
'label' => 'Th',
],
[
'label' => 'Fr',
],
[
'label' => 'Sa',
],
[
'label' => 'Su',
],
],
'cols' => 'inline',
],
],
],
]