1

I'm working on a web application for tablets. In the application there is an input element that requires an integer input. When the user clicks on the input element usually the letter keyboard pops up and then the user has to switch to the number pad. Is there an attribute that one can specify so that the tablet pops up a number pad instead?

howardlo
  • 1,401
  • 1
  • 15
  • 20

3 Answers3

2

Did you try number type:

<input type="number" name="quantity" min="0" max="1000" step="1">
Alex Art.
  • 8,711
  • 3
  • 29
  • 47
1

One of these types:

<input type="tel" ...>

<input type="number" ...>

The actual behaviour will depend on the tablet's platform. On iOS, the number keyboard has integers and arithmetic operators, and the tel keyboard has large digits and a #/* key only.

Source

joews
  • 29,767
  • 10
  • 79
  • 91
1

You can try <input type="number" />.

And if you want to remove arrows you can check : this answer

Community
  • 1
  • 1
Mateusz Rogulski
  • 7,357
  • 7
  • 44
  • 62