The preferred way to install this extension is through composer.
Either run
$ composer require maddoger/yii2-selectize:~1.0
or add
"maddoger/yii2-selectize": "~1.0"
to the require
section of your composer.json
file.
Selectize has lots of configuration options. For further information, please check the Selectize plugin website.
To use text input widget add the following to the view
use maddoger\widgets\SelectizeTextInput;
echo SelectizeTextInput::widget([
'name' => 'tags',
'value' => 'love, this, game',
'clientOptions' => [
// ...
],
]);
To use dropdown list widget add the following to the view
use maddoger\widgets\SelectizeDropDownList;
echo SelectizeDropDownList::widget([
'name' => 'tags',
'value' => ['love', 'this', 'game'],
'clientOptions' => [
// ...
],
]);
Comments