Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone web applications and specific input types

I remember seeing a tutorial a while back on this but am unable to re-Google it.

Supposedly there is a way to get Safari on the iPhone to give keyboards other than the default. It went something along the lines of this, where certain keywords in the input name attribute triggered it...

This would give the default keyboard:

<input type="text" name="normal_text" /> 

This would give the number entry keyboard:

<input type="text" name="blah_blah_zip" /> 

This would give the number entry keyboard:

<input type="text" name="blah_blah_email" /> 

Does anyone know if this is still an available feature, and if so, what the keywords for triggering it are? Thanks!

like image 447
ceejayoz Avatar asked Feb 27 '09 01:02

ceejayoz


People also ask

Can you make shortcuts on iPhone input info?

In My Shortcuts in the Shortcuts app on your iOS or iPadOS device, tap on a shortcut. The shortcut opens in the shortcut editor. Tap Any (or the current input) in the input action. If you don't see an input action, see Launch a shortcut from another app on iPhone or iPad or Receive what's onscreen.

What is the Web app on iPhone?

A web application is designed to look and behave in a way similar to a native application—for example, it is scaled to fit the entire screen on iOS. You can tailor your web application for Safari on iOS even further, by making it appear like a native application when the user adds it to the Home screen.


1 Answers

The Safari for iPhone How-To's indicate this is still possible with a different syntax.

Text: <input type="text" /> <!-- display a standard keyboard --> Telephone: <input type="tel" /> <!-- display a telephone keypad --> URL: <input type="url" /> <!-- display a URL keyboard --> Email: <input type="email" /> <!-- display an email keyboard --> Zip Code: <input type="text" pattern="[0-9]*" /> <!-- display a numeric keyboard --> 

Note:

To display a numeric keyboard, set the value of the pattern attribute to "[0-9]*" or "\d*".

like image 143
Gabe Hollombe Avatar answered Sep 30 '22 21:09

Gabe Hollombe