E
E
ELauD2016-02-28 20:26:59
Yii
ELauD, 2016-02-28 20:26:59

How to display one checkboxList in multiple columns?

Hello!
The task is to display one list of checkboxes (checkboxList) in several columns.

$form->field($model, 'checkboxes')->checkboxList($list);

The columns are formed from the following array:
$list = [
   1 => "Item 1.1",
   2 => "Item 1.2",
   3 => "Item 1.3",
   4 => "Item 2.1",
   5 => "Item 2.2",
   6 => "Item 3.1",
   7 => "Item 3.2",
...
];

Where the keys are the identifiers of some database elements, and the values ​​are the names for display
How can I display checkboxes by columns?
Item 1 | Item 2 | Item3
Item 1.1 | Item2.1 | Item3.1
Item 1.2 | Item2.2 | Item3.2
...
Thanks in advance for your help

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question