In my app there is a PIN number security, where the user needs to enter 3 digits. I use inputs of “password” type for that, but I’d like to show a telephone-type keyboard (with only the 10 digits) to open when the user clicks on those inputs.
Using <input type="tel"> is not good because I want the inputs to hide the digits like password-type inputs.
Any idea on how to do this? Also, this needs to work on both Android/iOS platforms.
Mhhh…just a quick idea… you could just save the input on change into another variable and replace the real model with * or whatever char you want.
Isn’t there a css property for this? like webkit-text-security or something? dont know if it only works on password fields though.
Have you considered having 2 fields (a visible and a hidden one) where a number field <input type="number"> (visible) is where user actually TYPE the password and another HIDDEN field will store a copy of password. By the time user types password, directive will copy digit to the hidden field and CHANGE the NUMBER field just typed number to “#” (for instance). When you post form, you will actually use the HIDDEN field no the visuble (number) one that might be something like “######”.
Not a very good solution, but I cant figure out now how to have a password field that shows only NUMBERs from the native device keyboard.