Open yii-bot opened 8 years ago
<?= $form->field($model, 'active')->checkbox(['template' => "<div class=\"togglebutton\">
This work in yii2
and for input field use this ->
`<?= $form->field($model, 'a_line_about_project',['template'=> '
Use like this`<?= $form->field($model, 'recomended_by_user', ['template'=>'
</div>'])->textInput(['class'=>"",'type'=>'checkbox'])?>`
This issue has originally been reported by @wangchj at https://github.com/yiisoft/yii2/issues/6439. Moved here by @wangchj.
The following is Gii generate form in PHP
The following is the HTML output. Notice, it doesn't resemble the template.