Getting Search Keyboard on iPhone with PhoneGap

I created a search field in a mobile application that I create through PhoneGap. I tried using with no luck. I also know that I could get around the visual aspect of the input field via CSS and Javascript, however how can I make the keyboard have a β€œSEARCH” button at the bottom right and not β€œRETURN”

+7
javascript iphone cordova
source share
3 answers

Using

<form> ... <input type="search" /> ... </form> 

<form> is required.

(See also http://groups.google.com/group/phonegap/browse_thread/thread/bca19709dbdf2e24/eb312d0607102395?lnk=raot )

+15
source share

Mobile safari supports the following: PhoneGap with iPhone OS 3.1

Text: <input type = "text" / ">

Phone: <input type = "tel" / ">

URL: <input type = "url" / ">

Email: <input type = "email" / ">

Postal Code: <input type = "text" pattern = "[0-9] *" / ">

Search is not supported as an input type and requires significant work in place in PhoneGap.

See here for more details: http://developer.apple.com/safari/library/codinghowtos/mobile/userexperience/index.html

+7
source share

Update: The following input type works as expected:

There are several important things you should keep in mind:

It only works on iPhone OS 3.1 +

The input tag MUST be inside the tag.

In addition, the following tags are worth noting:

 <!-- display a telephone keypad --> <label for="tiTel">Telephone:</label> <input type="tel" id="tiTel"/> <br/> <!-- display a URL keyboard --> <label for="tiUrl">URL:</label> <input type="url" id="tiUrl"/> <br/> <!-- display an email keyboard --> <label for="tiEmail">Email:</label> <input type="email" id="tiEmail"/> <br/> <!-- display a numeric keyboard --> <label for="tiZip">Zip Code:</label> <input type="text" pattern="[0-9]*" id="tiZip"/> <br/> 
+3
source share

All Articles