yii2mod/yii2-chosen-select

Chosen Select Widget based on Chosen jQuery plugin

Installs: 45 934

Dependents: 0

Suggesters: 0

Security: 0

Stars: 11

Watchers: 1

Forks: 7

Open Issues: 2

Type:yii2-extension

1.2 2018-08-20 14:45 UTC

This package is auto-updated.

Last update: 2020-07-31 00:22:14 UTC


README

Chosen Select Widget based on Chosen jQuery plugin chosen

Latest Stable Version Total Downloads License Build Status

Installation

The preferred way to install this extension is through composer.

Either run

composer require yii2mod/yii2-chosen-select

or add

"yii2mod/yii2-chosen-select": "^1.0"

to the require section of your composer.json.

Usage

  1. Usage with ActiveForm and model
echo $form->field($model, 'subject')->widget(\yii2mod\chosen\ChosenSelect::class, [
    'items' => [
        'first' => 'First',
        'second' => 'Second'
     ],
]); 
  1. Usage without a model
echo \yii2mod\chosen\ChosenSelect::widget([
     'name'  => 'select',
     'items' => BooleanEnum::listData(),
     'options' => [
         'width' => '95%'
     ]
 ]);

Select Options

You can find them on the options page

Support us

Does your business depend on our contributions? Reach out and support us on Patreon. All pledges will be dedicated to allocating workforce on maintenance and new awesome stuff.