I am trying to get all lowercase in a html text input field on a samsung android phone.
Can anyone suggest something else to try to stop the auto capitalization for the first letter in a text field?
I have tried the following and nothing works.
CSS
.my_username{text-transform:lowercase;}
input[type=text] {text-transform:lowercase;}
JS
my_username.setAttribute("autocapitalize","off");
in submitonenter(my_username.value.toLowerCase();)
HTML
input autocapitalize="off" type="text" class="my_username" name="username" size="19" value="" maxlength="19" onkeypress="submitonenter(event,this)"
Use autocapitalize="none" instead of autocapitalize="off" because "off" is deprecated for autocapitalize .
To turn auto caps off on Android, press “Settings” > “Text correction” > “Auto-capitalization.” Tap the toggle to turn it off. Another way is to tap “Settings” > “System” > “Languages and input” > “On-screen keyboard” > Gboard > “Text correction” before pressing the “Auto-capitalization” toggle.
You need to to say autocapitalize="off" in your markup
Example
<input type="text" autocorrect="off" autocapitalize="off"/>
Click here for more details.
For android phones you have to use autocomplete="off"
So if you want something generic, complete @kumars' answers this way:
<input type="text" autocorrect="off" autocapitalize="none" autocomplete="off"/>
The autocorrect and autocapitalize attributes works on the iPhone or the iPad, autocomplete is for any device running Android.
NB: Use autocapitalize="none"
instead of autocapitalize="off"
because "off" is deprecated for autocapitalize. See official documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With