I'm working on a HTML page. The page is used by multiple platforms: Ios, Android and Desktop. The problem I have is that on the android browser when I select an input the first letter is Capitalized by default. This is frustrating for users as all user names start with small letters. Is there a way to change this default?
I'm working on a HTML page. The page is used by multiple platforms: Ios, Android and Desktop. The problem I have is that on the android browser when I select an input the first letter is Capitalized by default. This is frustrating for users as all user names start with small letters. Is there a way to change this default?
Share Improve this question asked Sep 11, 2014 at 12:00 Pablo JomerPablo Jomer 10.4k11 gold badges59 silver badges104 bronze badges 2- possible duplicate of Can Android WebView HTML influence keyboard or keyboard features? – CodingIntrigue Commented Sep 11, 2014 at 12:09
- What kind of input are you referring to? Please show an example of HTML code. – Jukka K. Korpela Commented Sep 11, 2014 at 12:10
2 Answers
Reset to default 8<input type="text" autocapitalize="none">
This works for me.
What you are talking about is related to the android Keyboard itself, as mostly keyboards have this option to capitalize the first word by default! In order to overe this, in your html, you need to force the input to only show lowercase letters and convert all letters to lowercase, you can do it like this:
<input type="text" style="text-transform:lowercase;" on keyup="javascript:this.value=this.value.toLowerCase();">
See the DEMO here