OK, I've been reading a fair bit about this and am running into a few limitations... so here goes.
Consensus seems to be that a 'tel'
input is the easiest/best way to force filtering of input to numeric input on mobile devices. Mainly as it triggers the numeric keypad.
I'm trying to use a 'tel'
input field in HTML5 to prompt a user for their numeric PIN number inside a form for submission. Here is the input code:
<input type="tel" pattern="[0-9]" name="PIN" value="" maxlength="10" placeholder="Numeric PIN only" autofocus required />
A couple of things:
- How to get the keyboard to show when the page loads, and
- how to mask the values like a
type="password"
input field
The keyboard shows when I tap on the input, however I'd really like it (or any other keyboard) to pop up when the page loads.
I'm hoping for a 'light'/native solution if that is at all possible as I'm working with low bandwidth requirements.
Many thanks in advance.