Problems with HTML number inputs

Using type="number" on input fields is far less useful than I originally thought. I was previously using it for the form on Framer. Since they are number fields, having the number keyboard pop up on phones was useful. It also prevents people typing in non-numbers, so there's some free form validation.

But there were some issues:

Typing numbers is not like using an abacus. People don't enter numbers by adding one at a time. If they do (i.e. quantity fields), you are better off with explicit Add/Remove buttons, rather than the tiny tiny arrows that browser input fields give you.

There is a great writeup from Filament Group, I wanted to type a number, which runs through these problems and gives a solid solution.

Also see You Probably Don't Need input type="number".

← Posts