Skip to main content


This topic contains 3 replies, has 4 voices, and was last updated by  colin-stannard 3 years, 3 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #146359


    Hi there,

    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?




    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.

    HTML5 forms input types

    The article actually references an old video by Chris Coyier.


    Chris Coyier

    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.



    For anyone who is still looking for an easy way to capture credit card numbers, I recommend looking at a project I’m part of – Card Js

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

icon-link icon-logo-star icon-search icon-star