title: YII2 Setting selected value in DropDownlist in update page
body: <p>I created a CRUD application using the GII tool and it work well. In the <code>_form.php</code>, I edited the dropdown for province, municipality, and barangay like the following...</p>
  
  <pre><code>&lt;?= $form-&gt;field($model, 'province')
           -&gt;dropDownList([ '160200000' =&gt; 'AGUSAN DEL NORTE', 
                            '160300000' =&gt; 'AGUSAN DEL SUR',
                            '166700000' =&gt; 'SURIGAO DEL NORTE', 
                            '166800000' =&gt; 'SURIGAO DEL SUR',
                            '168500000' =&gt;'DINAGAT ISLANDS'
                          ], 
                          ['prompt' =&gt; '-----SELECT PROVINCE-----']
            )?&gt;
  
  &lt;?= $form-&gt;field($model, 'city_code')
           -&gt;dropDownList(['' =&gt; '-----SELECT PROVINCE FIRST-----'])?&gt;
  &lt;?= $form-&gt;field($model, 'brgy_code')
           -&gt;dropDownList(['' =&gt; '-----SELECT MUNICIPALITY FIRST-----'])?&gt;
  </code></pre>
  
  <p>Using Jquery I was able to change the values in the municipality dropdown according to the province selected. And so on with the brgy.</p>
  
  <p>However in the Index file, when I click the pencil icon or the EDIT link in the gridview, It shows all the equivalent values but not the province, municipality, and brgy. How can I change these values from the update.php file?</p>