Hacker News new | ask | show | jobs
by winduptoy 2658 days ago
Thank you! I had no idea that iOS required the pattern="\d" attribute. Those inputs require a decimal, so that pattern won't actually work (something like pattern="\d\.?\d*"). If I can get my hands on an iPhone to test that, I will deploy it shortly!
1 comments

Awesome!

Definitely a few hacks involved. I’ve seen different combinations of using pattern, type=number, step=“0.01” etc, but you may need support for longer decimals in qty/price.

I’m always on the lookout for form best practices, but it’s definitely hard to stay up with all of the current trends.

There are a few mobile preview tools, not sure which is currently best, for testing on different virtual devices:

Google search: test site with iphone online