title: Yii2: Is it possible to set visibile default value for an Autocomplete Widget?
body: <p>I initialize a model, and one attribute of it, on my controller</p>
  
  <pre><code>$model = new MyModel;
  $model-&gt;internal_code = 'BAUBAU';
  </code></pre>
  
  <p>Then I populate an array of codes suitable for autocomplete</p>
  
  <pre><code>$products = Product::find()
                  -&gt;select([
                          Product::tableName().'.id as id',
                          'internal_code as label',
                          'internal_code as value',
                      ])
                  -&gt;asArray()
                  -&gt;all();
  </code></pre>
  
  <p>Then I'd like to use an autocomplete to show the default value AND allow user to change it selecting via autocomplete widget.</p>
  
  <p>This the View code</p>
  
  <pre><code>echo $form-&gt;field($model, 'internal_code')
      -&gt;widget(AutoComplete::classname(),[
          'clientOptions' =&gt; [
                  'source'    =&gt; $products
              ]
          ])
      -&gt;label('Internal code');
  </code></pre>
  
  <p>Actually the widget works, user can digit chars and select from the results of autocomplete narrowed search.</p>
  
  <p>Bu the problem is that even if <code>$model-&gt;internal_code</code> is set, the widget, at loading, do not shows the value. <strong>The user don't see the default value ('BAUBAU') on screen.</strong> I'm not able to understand what property and/or client option to fill.</p>
  
  <p>Note: I added <code>jquery-ui</code> tag because this Yii2 widget uses the autocomplete widget of JqueryUI</p>