Yii2 - Display checkbox for boolean database field on active form

yii2
voted: 1
vote
yii2 active-form checkbox

Displaying checkbox for boolean value from database on active form. For example model has field - active.

<?php echo $form->field($model, 'active')->checkBox(['label' => 'active', 'selected' => $model->active])?>
working url: not entered
version: 2 and maybe others
Leave a Comment:
Characters left:
No comments yet.