Jak utworzyć checkbox group w yii2?Grupa kontrolna Yii2 z bootstrap 3
To czego potrzebujemy
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary active">
<input type="checkbox" autocomplete="off" checked> Checkbox 1 (pre-checked)
</label>
<label class="btn btn-primary">
<input type="checkbox" autocomplete="off"> Checkbox 2
</label>
<label class="btn btn-primary">
<input type="checkbox" autocomplete="off"> Checkbox 3
</label>
</div>
To co mam
<?
$options = ['uncheck'=>0];
echo ButtonGroup::widget([
'options' => [
'data-toggle' => 'buttons'
],
'buttons' => [
$form->field($model, 'field1')->checkbox($options),
$form->field($model, 'field2')->checkbox($options),
$form->field($model, 'field3')->checkbox($options),
],
]);
?>
Co muszę dodać mój kod, aby wygenerować to obniżenie?