Skip to content

Latest commit

 

History

History
49 lines (36 loc) · 1.54 KB

README.md

File metadata and controls

49 lines (36 loc) · 1.54 KB

Select widget for Yii2

Latest Stable Version Total Downloads License

Yii2 wrapper for bootstrap-select.

Installation

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.

Demo

You can view demo and examples here.

Usage

<?= $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' => [],
]) ?>