News for hackers. Stuff that matters.
Re:The anatomy of a credit card form by provemewrong on Wednesday July 15, 2015 @09:13AM (#9891047)
Ah, I didn't notice the demo. That is actually pretty nice. If only they would do the same with the credit card number field and spaces.

Edit: okay seems like it is more thought out than I assumed.

Re:The anatomy of a credit card form by grkvlt on Wednesday July 15, 2015 @09:19AM (#9891071)
They do exactly that! However it depends on the type of card, so if you just start typing '1234567' it is not a valid card number and is unformtted. Try entering something that starts '42' (for a Visa debit card) and it will be formatted as such, in four groups of four digits. They also recognise AMEX cards and format appropriately, try '345612346712348' for example.
Re:The anatomy of a credit card form by insin on Wednesday July 15, 2015 @09:21AM (#9891084)
They do, but only when the number you're entering is recognised as one of the expected formats. If you type 1234, you'll see the space being added, but it's then stripped again with the next digit you input. If you hold down 4 or type 3 then hold down 4, the spaces will be added.

Things get fun if you try to go back and edit the number, though. Forms are hell :)