title: How do you set a textInput to readOnly in Yii2?
body: <p>How do you set a <code>textInput</code> to <code>readOnly</code>? I have the sample code below:</p>
  
  <pre><code>&lt;?= $form-&gt;field($model, 'GrossPay')-&gt;textInput(['id'=&gt;'GrossPay','readonly'=&gt; true])?&gt;
  </code></pre>