yii-ui/yii2-materialize-select2

This package is abandoned and no longer maintained. No replacement package was suggested.

Select2 Widget for Yii 2 with Materialize styles

Installs: 742

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 2

Forks: 0

Open Issues: 2

Language:SCSS

Type:yii2-extension

v1.1.2 2018-07-04 11:57 UTC

This package is not auto-updated.

Last update: 2023-08-19 23:32:47 UTC


README

Latest Stable Version Total Downloads Maintainability Yii2 License

This is an Yii framework 2.0 widget of the Select2 replacement for select boxes with styles for the Materialize CSS Framework.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require yii-ui/yii2-materialize-select2

or add

"yii-ui/yii2-materialize-select2": "~1.1.0"

to the require section of your composer.json file.

Usage

as active form element:

use yiiui\yii2materializeselect2\Select2:

echo $form->field($model, 'attribute')->widget(Select2::class, [
    'items' => [1 => 'Apple', 2 => 'Banana'],
    'options' => [
        'placeholder' => 'Select your favourite',
    ],
    'clientOptions' => [
        'allowClear' => true
    ],
]);

or as widget:

Select2::widget([
    'name' => 'input-name',
    'value' => 2,
    'items' => [1 => 'Apple', 2 => 'Banana'],
    'options' => [
        'placeholder' => 'Select your favourite',
    ],
    'clientOptions' => [
        'allowClear' => true
    ],
]);

More Examples will be added soon at https://www.yii-ui.com/yii2-materialize-select2. For plugin configuration see Select2 Documentation.

Documentation

Documentation will be added soon at https://www.yii-ui.com/yii2-materialize-select2.

License

yii2-materialize-select2 is released under the MIT License. See the LICENSE.md for details.