PHP code example of moxuandi / yii2-tagsinput
1. Go to this page and download the library: Download moxuandi/yii2-tagsinput library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
moxuandi / yii2-tagsinput example snippets
1. 简单调用:
$form->field($model, 'tags')->widget(moxuandi\tagsInput\TagsInputWidget, [
'clientOptions' => [
'trimValue' => true,
],
])
2. 不带 $model 调用:
\moxuandi\tagsInput\TagsInputWidget::widget([
'name' => 'tags',
'clientOptions' => [
'trimValue' => true,
],
]);