yiier/yii2-bootstrap4-select

Yii2 wrapper for boostrap4-select.

v1.0 2021-07-05 07:45 UTC

This package is auto-updated.

Last update: 2024-12-05 15:50:04 UTC


README

Yii2 wrapper for boostrap4-select.

Latest Stable Version Total Downloads Latest Unstable Version License

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist yiier/yii2-bootstrap4-select "*"

or add

"yiier/yii2-bootstrap4-select": "*"

to the require section of your composer.json file.

Demo

You can view demo and examples here.

Usage

<?php
use yiier\bootstrap4\select\SelectPicker;


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

Credits

romeyk/yii2-bootstrap-select