CSS: Text-Transform

If you are creating a form and want to have only uppercase characters shown to the user, you can apply the style ‘text-transform: uppercase‘ to the input field.

For example:

< input class="form-input" style="text-transform: uppercase;" name="Zip" type="text" placeholder="Zip Code" />

BEWARE: This will not save the form input as uppercase.

To save the input field as uppercase, in your JavaScript, you will need to apply .toUpperCase() to the input string.

Other text-transform values can be found here.

Screen Shot 2017-08-14 at 4.07.35 PM

 

Advertisements