wbraganca/yii2-selectivity

The yii2-selectivity is a Yii 2 wrapper for [selectivity](https://arendjr.github.io/selectivity/). A modular and light-weight selection library for jQuery and Zepto.js.

Installs: 2 054

Dependents: 0

Suggesters: 0

Stars: 5

Watchers: 1

Forks: 1

Open Issues: 0

Type:yii2-extension

1.0.2 2015-11-07 23:27 UTC

README

Latest Version Software License Total Downloads

Install

Via Composer

$ composer require wbraganca/yii2-selectivity

or add

"wbraganca/yii2-selectivity": "*"

to the require section of your composer.json file.

Usage

On your view file.


<?php
use wbraganca\selectivity\SelectivityWidget;
?>

<?= $form->field($model, 'city')->widget(SelectivityWidget::classname(), [
    'pluginOptions' => [
        'allowClear' => true,
        'items' => ['Amsterdam', 'Antwerp'],
        'placeholder' => 'No city selected'
    ]
]) ?>

For more options, visit: https://arendjr.github.io/selectivity/#api