Select2 Default values for multiple select and allowed tags
<p>I have a select 2 multi-select option </p>

<pre><code>&lt;select multiple name="event_type[]" class="form-control" id="selectEvents"&gt;
   @foreach ($eTypes as $type)
       &lt;option&gt;{{$type}}&lt;/option&gt;
   @endforeach
&lt;/select&gt;
</code></pre>

<p>I want to set some default values just in case the user is editing the form.
I have successfully done that by doing this</p>

<pre><code>var s2 = $("#selectEvents").select2({
    placeholder: "Choose event type",
    tags: true
});

s2.val(["Trade Fair", "CA", "Party"]).trigger("change"); //CA doesn't show as a default
</code></pre>

<p>But the problem is i am allowing user generated options using the <code>tags: true</code> option for select2.</p>

<p>When I set a default value that was initially in the html options it works, but when I set a default that was user generated it doesn't work.</p>

<p>It is my first time using select2. </p>

<p>How can i achieve this?</p>