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

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s