Answer the question
In order to leave comments, you need to log in
How to display the value of a SET type field in a form using a checkboxlist?
The MySQL table has a field days of type SET, which is a set of days of the week. The model in Yii receives from the base and returns the days attribute as a string, where the values are separated by a comma. Using:
$form->field($model, 'days')->checkboxList(['Пн'=>'Пн', 'Вт'=>'Вт'...]);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question