Come creare checkbox group in yii2?Gruppo di caselle Yii2 con bootstrap 3
Questo è quello che ci serve
<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>
Questo è quello che ho
<?
$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),
],
]);
?>
Che cosa devo aggiungi il mio codice per generare quel markdown?