yii2-tagsinput

Usage

Demo - 1

Source

<?php

/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model app\modules\yii2extensions\models\ExampleForm */

use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use wbraganca\tagsinput\TagsinputWidget;

// init values
$model->tags = 'Yii2;yii2-extensions;yii2-tagsinput';
?>

<?php $form = ActiveForm::begin(); ?>

<?= $form->field($model, 'tags')->widget(TagsinputWidget::classname(), [
    'clientOptions' => [
        'trimValue' => true,
        'allowDuplicates' => false,
        'delimiter' => ';'
    ]
]) ?>

<?php ActiveForm::end(); ?>

For more options, visit: http://bootstrap-tagsinput.github.io/bootstrap-tagsinput/examples