maddoger/yii2-selectize

Selectize.js widget for the Yii 2 framework

Installs: 28

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

v1.0.0 2015-10-12 14:36 UTC

This package is not auto-updated.

Last update: 2024-11-09 16:27:16 UTC


README

Installation

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.

Usage

Selectize has lots of configuration options. For further information, please check the Selectize plugin website.

Text input widget

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' => [
        // ...
    ],
]);

Dropdown list widget

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' => [
        // ...
    ],
]);