PHP code example of rbshubham / yii2-widget-tagsinput

1. Go to this page and download the library: Download rbshubham/yii2-widget-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/ */

    

rbshubham / yii2-widget-tagsinput example snippets


use shubham\tagsinput\TagsInput;

// Usage with ActiveForm and model
echo $form->field($model, 'tags')->widget(TagsInput::classname(), [
    "options"=>[
        // Input Options Here
    ],
    'pluginOptions'=>[
        // Refer to https://bootstrap-tagsinput.github.io/bootstrap-tagsinput/examples/#options
        // Enables clear all tags button
        'allowClear'=>true; // default true
    ],
    'pluginEvents'=>[
        // Refer to https://bootstrap-tagsinput.github.io/bootstrap-tagsinput/examples/
    ]
]);


// Without model & without ActiveForm
echo TagsInput::widget([
    'name' => 'tags',
]);

$ php composer.phar