我想为我的checkboxList使用一个模板。我在其他ActiveForm字段上使用了模板,但在checkboxList字段上似乎不起作用。
我只需要将输入设置为of sm-7而不是6。
<?= $form->field($model, 'days', [
'template' => "<div class='col-sm-3'>{label}</div><div class='col-sm-7'>\n{input}</div>\n{hint}\n{error}"])
->inline()
->checkboxList(Onlinestore::$days, []) ?>
</div>发布于 2015-04-20 17:54:46
ActiveField中没有checkboxTemplate选项。应该是template
<?= $form->field($model, 'days', ['template' => "<div class='col-sm-3'>{label}</div><div class='col-sm-7'>\n{input}</div>\n{hint}\n{error}"])
->inline()
->checkboxList(Onlinestore::$days, []) ?>https://stackoverflow.com/questions/29744331
复制相似问题