HTML input field: automatically displays a numeric input method

I have a web application with a layout configured for working with mobile devices. However, most of my input fields on forms are numeric.

Each time I access the form using my Android phone and click on one of the input fields to create an input field, qwerty appears and I need to switch to the numeric input method and enter some numbers. It is not comfortable.

Is there an HTML or sth property. similarly, what will make Android (and iPhone) display the default numeric keypad?

Again, this is a Rails app, not a native smartphone app.

Any thanks, thanks.

+5
source share
3 answers

HTML 5 type='number'says the field expects only numbers and modern browsers to allow only numerical inputs.

<input type='number' value='123' />

EDIT:

Let me change a little, because judging by the comments, the original answer is a bit shallow for most.

Basically, you have three options: type='number', type='range'and type='tel'. None of them are designed to work. The result depends on the browser and keyboard.

For example, my Android Opera Mobile does not request a numeric keypad, but it adds a spinbox to the field number, just like the desktop version. A spinbox that works with step='0.1', but is not suitable for use in mobile applications with the current implementation.

Android Firefox 5, number - , , , tel! ! ABC DEF GHI 1 2 3, . type='tel' HTML5 (), . ( 2013-08: tel HTML5! ...)

range, , . , , iPhone Safari , . , .

, . HTML 5. ; , , .

+13

, .

Android- type="number . , iOS , . . iOS pattern. HTML :

<input type="number" pattern="[0-9]*" value="123" />
+6

type = 'tel'/ HTML?

type = 'tel' html5, ?

, tel :

  • :

:

0401234567

  • :

, :

+358401234567

, "tel" :

, "+".

.

.

:

+61418765432 ( )

0418765432 ( )

, , , (212) 1234567.

, .

, , . , "tel" , , .

, .

12 .

, , :

0501234567890

+358501234567890 .

GSM, AT-, ( ) () . ,

, , "+",

, ,

, , , , , , , .

, "tel" , , - , , ?

+1

All Articles