title: Yii2: show init text for kartik/select2 on load
body: <p>I am using <a href="http://demos.krajee.com/widget-details/select2#usage-ajax" rel="nofollow noreferrer"><strong><code>KARTIK-Select2-AJAX</code></strong></a>. </p>
  
  <p>All work fine, but I got id of title which I found instead text of title.<a href="https://i.stack.imgur.com/IT7GO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IT7GO.png" alt="enter image description here"></a></p>
  
  <p>How I can get title in $_POST after save? after selected item of dropdown I save this in db through other ajax request. I think that the problem lies below. </p>
  
  <pre><code>   'ajax' =&gt; [
          'url' =&gt; $url,
          'dataType' =&gt; 'json',
          'data' =&gt; new JsExpression('function(params) {return{q:params.term}; }')
      ],
  
      'escapeMarkup' =&gt; new JsExpression('function (markup) { return markup; }'),
  
      'templateResult' =&gt; new JsExpression('function(city) { return city.text; }'),
  
      'templateSelection' =&gt; new JsExpression('function (city) { return city.text; }'),
  </code></pre>