Hi.
I have the checkbox list in my form and I have a problem with update form…
_form.php:
$colors= ArrayHelper::map(Colors::find()->all(),'id','color');
<?= $form->field($model, 'colors[]')->checkboxList($colors); ?>
controller, function Create:
$model->colors = empty($model->colors) ? '' : implode(',', $model->colors);
It works fine, but how to select the checkboxes in Update Form as checked ?