romeyk/yii2-bootstrap-select

Select widget for Yii2.

Installs: 77

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Type:yii2-extension

1.0 2021-04-17 12:46 UTC

This package is auto-updated.

Last update: 2024-05-18 01:52:47 UTC


README

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