leealex / yii2-button-group
This widget renders bootstrap button group.
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 267
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Type:yii2-extension
Requires
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2020-01-07 10:43:40 UTC
README
This widget renders button group based on Bootstrap.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist leealex/yii2-button-group "*"
or add
"leealex/yii2-button-group": "*"
to the require section of your composer.json
file.
Usage
Once the extension is installed, simply use it in your code by :
<?= $form->field($model, 'active')->widget(ButtonGroup::className(), [ 'default' => 1, 'items' => [ ['label' => 'Yes', 'value' => 1], ['label' => 'No', 'value' => 0], ] ]) ?>