Widget for tags adding. Based on https://goodies.pixabay.com/jquery/tag-editor/demo.html, (*1)
Installation
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist tolik505/yii2-tag-editor "*"
or add, (*4)
"tolik505/yii2-tag-editor": "*"
to the require section of your composer.json
file., (*5)
Usage
Once the extension is installed, simply use it in your code by :, (*6)
php
<?= $form->field($model, 'tags')->widget(TagEditor::className(), [
'tagEditorOptions' => [
'autocomplete' => [
'source' => Url::toRoute(['route/to/get-tags-action'])
],
]
]) ?>
, (*7)