in your _form.php
echo '<label class="control-label">Tag Content</label>';
echo Select2::widget([
'model' => $model,
'attribute' => 'tags',
'name' => 'tags',
'data' => common\models\Tag::getOptions(),
'options' => [
'placeholder' => 'Select a color ...',
'class' => 'form-control',
'multiple' => true
], ]);
then add following code in your model
public static function getOptions(){
$data= static::find()->all();
$value=(count($data)==0)? [''=>'']: \yii\helpers\ArrayHelper::map($data, 'id','name'); //id = your ID model, name = your caption
return $value;
}