title: Setting value of yii2 select2 widget from javascript
body: <p>Is it possible to set certain options as selected in yii2 select2 widget from jquery. The widget is not initialised through js but it is bound to model attribute in form. Any help would be appreciated</p>
  
  <p>Code:</p>
  
  <pre><code>echo $form-&gt;field($model, 'news_tags')-&gt;widget(Select2::classname(), [
                      'data' =&gt; ArrayHelper::map(app\models\Topics::findAll(['status' =&gt; 1]), 'tp_id', 'title'),
                      'options' =&gt; ['multiple' =&gt; true, 'placeholder' =&gt; 'Select Tags ...'],
                      'pluginOptions' =&gt; [
                          'tags' =&gt; false,
                          'allowClear' =&gt; true
                      ],
                  ])-&gt;label(FALSE);
  </code></pre>
  
  <p>I am trying to use an ajax call and on succes i want to add some tags from clientside.</p>