Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Yii2 Toggle checkbox
<?php echo $form->field($model->notifications, "status", ['checkboxTemplate' => '
<span class="label">{label}</span>
<label class="toggle-inner">
{input}
<div class="toggle-background"></div>
<div class="toggle-button"></div>
</label>
','options' => [
'tag' => null,
],])->checkbox()->label($notification->type->name); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment