title: Yii2: How to capitalize in a text field?
body: <p>I have this text field and I need to capitalize (uppercase the first letter) when the user types a word:</p>
  <pre><code>&lt;?= $form-&gt;field($model, 'name')-&gt;textInput(['maxlength' =&gt; true]) ?&gt;
  </code></pre>
  <p><strong>Example.</strong> I have this:</p>
  <p><a href="https://i.stack.imgur.com/Jsg95.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Jsg95.png" alt="lower-case" /></a></p>
  <p>But I need this:</p>
  <p><a href="https://i.stack.imgur.com/Jbpoo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Jbpoo.png" alt="upper-case" /></a></p>
  <p>Maybe I have to use jQuery (I prefer not to use it :) ).</p>