faryshta/yii2-jquery-tagsinput

Yii2 widget for Jquery TagsInput plugin

Installs: 25 177

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 2

Forks: 2

Open Issues: 1

Type:yii2-extension

1.0.0 2017-01-13 09:48 UTC

This package is not auto-updated.

Last update: 2024-04-27 16:20:16 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License

Yii2 widgets for jQuery Tags Input (tag list) jquery plugin

Installation

The preferred way to install this extension is through composer.

Either run

composer require --prefer-dist "faryshta/yii2-jquery-tagsinput:*"

or add

"faryshta/yii2-jquery-tagsinput": "*"

to the require section of your composer.json file.

Usage

use faryshta\widgets\JqueryTagsInput;

// with ActiveForm
echo $form->field($model, 'attribute')->widget(JqueryTagsInput::className(), [
    // extra configuration
]);

// without ActiveForm and with model.
echo JqueryTagsInput::widget([
    'model' => $model,
    'attribute' => 'attribute',
    // extra configuration
]);

Documentation

This library doesn't define anything new, the widgets classes are very similar to the class \yii\bootstrap\Widget which can be used as documentation for the widget classes.

The JS options can be passed using the $clientOptions property and the events can be declared using the $clientEvents property. The documentation on all the options and events supported by tagsInput can be found here.

License

The BSD License (BSD). Please see License File for more information.