iPhone browser defaulting to uppercase for first letter of password fields

IphoneHtmlUser InterfaceSafari

Iphone Problem Overview


I'm writing a login page for a mobile version of my webapp and I have a simple HTML password field like so:

<input id="password" type="password" />

The only problem is that the iPhone Safari browser capitalizes the first letter of the input by default, which is confusing my users as the password is case sensitive and they do not always realise this is the case.

Does anyone know of a method, tag or otherwise to stop this happening and force the iPhone input to lowercase unless the user specifies otherwise? Or is this simply a feature of the platform that can't be changed?

Iphone Solutions


Solution 1 - Iphone

<input type="text" name="test1" autocapitalize="none"/>

The docs can be found here: Supported Attributes: autocapitalize

Solution 2 - Iphone

You may want to turn off both autocorrect and autocapitalize for password and email fields.

Here are what mine look like:

<input autocapitalize="off" autocorrect="off" id="email" name="email" type="text">
<input autocapitalize="off" autocorrect="off" id="password" name="password" type="password">

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
QuestionRory HarveyView Question on Stackoverflow
Solution 1 - IphoneGerbenView Answer on Stackoverflow
Solution 2 - IphonedigidigoView Answer on Stackoverflow