cols

cols
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 to inline 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

      'checkbox_2' => [ 
         'exclude' => 1,
         'label' => 'checkbox_2',
         'description' => 'one checkbox with label',
         'config' => [ 
            'type' => 'check',
            'items' => [ 
               '0' => [ 
                  '0' => 'foo',
                  '1' => '',
               ],
            ],
         ],
      ],
      // Example from extension "styleguide", table "tx_styleguide_elements_basic"

Inline columns

      'checkbox_16' => [ 
         'exclude' => 1,
         'label' => 'checkbox_16',
         'description' => 'cols=inline',
         'config' => [ 
            'type' => 'check',
            'items' => [ 
               '0' => [ 
                  '0' => 'Mo',
                  '1' => '',
               ],
               '1' => [ 
                  '0' => 'Tu',
                  '1' => '',
               ],
               '2' => [ 
                  '0' => 'We',
                  '1' => '',
               ],
               '3' => [ 
                  '0' => 'Th',
                  '1' => '',
               ],
               '4' => [ 
                  '0' => 'Fr',
                  '1' => '',
               ],
               '5' => [ 
                  '0' => 'Sa',
                  '1' => '',
               ],
               '6' => [ 
                  '0' => 'Su',
                  '1' => '',
               ],
            ],
            'cols' => 'inline',
         ],
      ],
      // Example from extension "styleguide", table "tx_styleguide_elements_basic"