How do you turn off auto-capitalisation in HTML form fields in iOS?

IosHtml

Ios Problem Overview


By default, iOS’s keyboard sets the first letter in text form fields (including type=email) to uppercase. (At least prior to iOS 5.)

Is there any way to disable the autocapitalization?

Ios Solutions


Solution 1 - Ios

Since iOS 5, type="email" has auto-capitalization disabled automatically, so you simply need:

<input type="email">

For other input types, there are attributes available that do what they say:

<input type="text" autocorrect="off" autocapitalize="none">

If for some reason you want to support iOS prior to version 5, use this for type="email":

<input type="email" autocorrect="off" autocapitalize="none">

More information:

Solution 2 - Ios

Just as a heads up, if you're looking at this example and you're using React Native, you'll want to use those props as camelcase.

autoCapitalize

and

autoCorrect

This confused me a bit until I looked at the React Native Documentation for Text Inputs.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionPaul D. WaiteView Question on Stackoverflow
Solution 1 - IosthirtydotView Answer on Stackoverflow
Solution 2 - IosHolly EView Answer on Stackoverflow