An Yii2 chosen select extension based on Chosen jQuery plugin.
Chosen is a jQuery plugin that makes long, unwieldy select boxes much more user-friendly.
The preferred way to install this extension is through Composer.
Either run
php composer.phar require uran1980/yii2-chosen-select "dev-master"
or add
"uran1980/yii2-chosen-select": "dev-master"
to the require section of your composer.json
To activate this widget add this line to you view or layout:
<?php echo uran1980\yii\widgets\chosen\ChosenSelect::widget(); ?>
or add as dependensy in you AssetBundle.php
:
namespace frontend\assets;
class YourAppAsset extends \yii\web\AssetBundle
{
...
public $depends = [
'uran1980\yii\widgets\chosen\ChosenSelectAsset',
...
];
}
Ivan Yakovlev, e-mail: uran1980@gmail.com
Comments