Force Numeric Keyboard for Number Fields on Mobile
🧪
This snippet forces the numeric keyboard for Number fields on mobile devices by updating the “type” attribute of the input to “tel” instead of “number”. If you find there are any drawbacks to this approach, let us know!
Known Limitations
- This will not work if you’re collecting decimal numbers as mobile numeric keyboards do not support decimals or commas.
Instructions
See “Where do I put snippets?” in our documentation for installation instructions.
Code
Filename: gw-force-numeric-keyboard-on-mobile.php