1

I am trying to make a password field with a numeric keyboard on a mobile application.

I use this line for the input :

<input type="password" id="password" data-i18n="[placeholder]app.login_verification"/>

When I switch the type to type="number" it shows the numeric keyboard but when I put something from keyboard it shows the numbers which I added. So I need to hide them like "****".

Anyone ?

  • You could use [HTML text input allows only numeric input](https://stackoverflow.com/questions/469357/html-text-input-allows-only-numeric-input) and the attribute `type="password"`. – TheKeymaster Sep 29 '17 at 08:56
  • Use this attribute in your edittext inside the xml file android:inputType="textPassword" or android:inputType="numberPassword" – Pravin Fofariya Sep 29 '17 at 09:00
  • Use this for the number keyboard and non readable number password android:inputType="numberPassword" – Pravin Fofariya Sep 29 '17 at 09:09
  • Question shouldn't be marked as Duplicate as it is completely different framework. anyways. you should take input type as `number` and add style `-webkit-text-security: disc;` it will make test look like password characters. – Arpit Vasani Oct 02 '17 at 14:02
  • I did not change the input type but just added this to the same line < ... style="-webkit-text-security: disc;" > like this and it did work. – Süleyman GÜNDÜZ Oct 03 '17 at 14:19

0 Answers0