Numeric Keypad on Form Input Fields

1,669 views
Skip to first unread message

Mark Tomlin

unread,
Nov 27, 2009, 2:38:25 AM11/27/09
to iphone...@googlegroups.com
I just wanted to share this all with you as it was a problem that
plagued me for a little while.

When you want the user to input a number into the text field, you must
set the name attribute to contain 'zip' or 'phone'.

For example:

<input type="text" name="phone_number" />
or
<input type="text" name="zip" />

When your user selects the field they will be presented with the
iPhone's numeric keypad.

Apparently there are better solutions such as the CSS -wap-input-format.

Happy Programming!

Source: http://www.bennadel.com/blog/1197-Defaulting-To-The-Numeric-Keyboard-On-The-iPhone.htm

--
Thank you for your time,
Mark 'Dygear' Tomlin;

Remi Grumeau

unread,
Nov 27, 2009, 4:03:16 AM11/27/09
to iphone...@googlegroups.com
<input type='tel'/>
<input type='number'/>
<input type='email'/>
:)

Use them carefully cause a zipcode in number only wouldn't work for UK zipcode for example

Remi

--

You received this message because you are subscribed to the Google Groups "iPhoneWebDev" group.
To post to this group, send email to iphone...@googlegroups.com.
To unsubscribe from this group, send email to iphonewebdev...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/iphonewebdev?hl=en.




Remi Grumeau
(+33) 663 687 206

Mark Tomlin

unread,
Nov 27, 2009, 7:00:56 AM11/27/09
to iphone...@googlegroups.com
British Zip Codes are not Zip Codes at all they are Post Codes and Alphanumeric.

[a-zA-Z0-9]{3}-[A-Za-z0-9]{3}

On Fri, Nov 27, 2009 at 4:03 AM, Remi Grumeau <remi.g...@gmail.com> wrote:
> Use them carefully cause a zipcode in number only wouldn't work for UK zipcode for example

anmldr

unread,
Nov 27, 2009, 9:41:20 PM11/27/09
to iPhoneWebDev
I have not tried this lately. I thought that it was not available in
iPhone 3.0 but was available for 2.0

Is it working again?

Linda

thomas alexander

unread,
Nov 27, 2009, 11:06:04 PM11/27/09
to iphone...@googlegroups.com

It is working in 3.1

anmldr

unread,
Nov 28, 2009, 12:04:18 AM11/28/09
to iPhoneWebDev
Now I remember another reason that I did not use it. There is no
decimal and backspace button. I created my own numeric keypad because
I am using it as a calculator and I needed these. Also added a
calculate button.

Linda

thomas alexander

unread,
Nov 28, 2009, 5:11:50 AM11/28/09
to iphone...@googlegroups.com
Hi

how can i adjust width  of text field, select box when orientations is chnaged, i  have given 100% as width but not working , do anyone have a  simpel demo


Linda

Reply all
Reply to author
Forward
0 new messages