title: Yii2 how to create table template using select2 widget
body: <p>I have a dropdown list using select2 widget to get the customer contact</p>
  
  <pre><code>$getcontact = ArrayHelper::map(OpContact::find()-&gt;all(),'id','code');
  
   &lt;div class="col-md-10"&gt;'.
                       $form-&gt;field($model, 'contact_id')-&gt;widget(Select2::classname(), [
                            'data' =&gt; $getcontact,
                            'language' =&gt; 'en',
                            'options' =&gt; ['placeholder' =&gt; 'Select'],
                            'pluginOptions' =&gt; [
                                'allowClear' =&gt; true
                            ],                             
                        ])-&gt;label(false).' 
  </code></pre>
  
  <p>For now, its just a normal dropdownlist which show only the contact id.How I can like insert 2nd column for it and put all the data inside a table. For example, I want the dropdown to look like this where I can see the id and the contact name together.</p>
  
  <pre><code>------------------------------
       ID         Contact ID
  ------------------------------
       21          contact1
       22          contact2
       23          contact3
       24          contact1
  </code></pre>
  
  <p>Anyone have any idea? Thanks</p>