August 10, 2013 at 4:47 pm #146359
I just put in the ‘number’ type for an input field and on my iPad, it works – shows the number keypad. Great, but when I on a PC or Mac, it shows up and down arrows, like it’s a quantity box.
Huh. Am I missing something? What about just a regular ol’ number box?August 11, 2013 at 1:16 am #146376
To me a Credit Card Number isn’t actually a number at all…if you see what I mean.
It’s actually, the way I see it, a text string (or 4 text strings if you like).
You aren’t going to do any manipulation of the number so there really isn’t any need to treat it as one.
Anyway, here’s an article on HTML5 inputs…’number’ is about half way down.
The article actually references an old video by Chris Coyier.August 12, 2013 at 12:42 pm #146560
Definitely type=text with the pattern as @traq suggested. I’ve made this mistake before too. It can do awkward stuff like add commas into the number on blur in some browsers.November 22, 2015 at 2:07 pm #235107
You must be logged in to reply to this topic.