wbraganca / yii2-multiselect
The yii2-multiselect is a Yii 2 wrapper for [Bootstrap Multiselect](http://davidstutz.github.io/bootstrap-multiselect/).
Installs: 17 939
Dependents: 1
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 1
Open Issues: 3
Type:yii2-extension
Requires
- bower-asset/bootstrap-multiselect: ~0.9
- bower-asset/multiselect: ~0.9
- yiisoft/yii2: ~2.0.0
- yiisoft/yii2-bootstrap: ~2.0.0
Requires (Dev)
- phpunit/phpunit: ~4.0
This package is not auto-updated.
Last update: 2024-12-21 21:36:41 UTC
README
Install
Via Composer
$ composer require "wbraganca/yii2-multiselect:~1.0.1"
or add
"wbraganca/yii2-multiselect": "~1.0.1"
to the require section of your composer.json
file.
Usage
On your view file.
<?php use wbraganca\multiselect\MultiSelectWidget; ?> <?= MultiSelect::widget([ 'options' => [ 'multiple' => 'multiple', ], 'clientOptions' => [ 'nonSelectedText' => 'Check an option!', 'nSelectedText' => ' - Options selected!', 'allSelectedText' => 'All', 'selectAllText' => 'Check all!', 'numberDisplayed' => 1, 'enableCaseInsensitiveFiltering' => true, 'maxHeight' => 300, // The maximum height of the dropdown. This is useful when using the plugin with plenty of options. 'includeSelectAllOption' => true ], 'data' => $cities, 'model' => $model, 'attribute' => 'cities', ]) ?>
For more options, visit: http://davidstutz.github.io/bootstrap-multiselect