Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting Search Keyboard on iPhone using PhoneGap

I have created a search field on a mobile app i am creating via PhoneGap. I've tried using with no luck. I also know that i could get around the visual aspect of the input field via CSS & Javascript, however how do i get the Keyboard to have a "SEARCH" button on the bottom right instead of it saying "RETURN"

like image 771
abritez Avatar asked Jan 19 '10 19:01

abritez


2 Answers

Use

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

The <form> is a must.

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

like image 160
kennytm Avatar answered Nov 09 '22 05:11

kennytm


The following are supported in mobile safari, and therefore PhoneGap since iPhone OS 3.1

Text: <input type="text" />

Telephone: <input type="tel" />

URL: <input type="url" />

Email: <input type="email" />

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

Search is not supported as an input type, and would require considerable native work to make happen in PhoneGap.

See here for details: https://developer.apple.com/library/content/documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/KeyboardManagement/KeyboardManagement.html

like image 30
Jesse Avatar answered Nov 09 '22 05:11

Jesse