Yii2 wrapper for bootstrap-select.
The preferred way to install this extension is through composer. Check the composer.json for this extension's requirements and dependencies.
To install, either run
$ php composer.phar require romeyk/yii2-bootstrap-select "~1.0"
or add
"romeyk/yii2-bootstrap-select": "~1.0"
to the require
section of your composer.json
file.
You can view demo and examples here.
<?= $form->field($model, 'attribute')->widget(SelectPicker::class, [
'items' => ArrayHelper::map(User::find()->all(), 'id', 'email'),
'options' => [
'prompt' => '',
'multiple' => true,
],
'clientOptions' => [
'liveSearch' => true,
'noneSelectedText' => '',
'styleBase' => 'form-control',
'style' => '',
],
'clientEvents' => [],
]) ?>