Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

input number has empty value

The hack is to use type="tel" instead of type="number".

This solves the 2 main issues:

It pulls up a number keypad on mobile devices
It validates (and is not empty) with numbers or non-numbers as input.
 
PREVIOUS NEXT
Tagged: #input #number #empty
ADD COMMENT
Topic
Name
8+6 =