How do you get the number keypad to come up in an iPhone web app?

13

2

On a web page that is to be displayed on an iPhone, is there a way to get the number pad to come up when the user taps in the field, instead of the qwerty keypad?

This guy says here's how to do it, but as of 2.0, this "feature" was disabled.

I'm guessing there's some fancy javascript to employ to get around this limitation?

commanda

Posted 2008-11-10T22:52:06.957

Reputation: 4 437

Answers

2

If you use the HTML5 number input type, the keyboard will default to showing numbers. It's not the number-only keyboard, but it's a bit better than just text.

icktoofay

Posted 2008-11-10T22:52:06.957

Reputation: 101 029

1

Yes, this used to be possible by including the word "zip" in your text field's name attribute. Unfortunately, Apple seems to have removed this in 2.0 and later. I suggest you file a bug.

August

Posted 2008-11-10T22:52:06.957

Reputation: 11 577

0

You can make calls from JavaScript to Objective-C and then display what ever you want. If you want a framework to help you out you could check out QuickConnectiPhone. It is available at https://sourceforge.net/projects/quickconnect/.

You could also check out http://tetontech.wordpress.com. This is the develpment blog for QuickConnect. It has some example code in addition to that which is included in the sourceforge download.

Lee

Posted 2008-11-10T22:52:06.957

Reputation: 731