Search code examples
iphonehtmlipadsafari

Show 'Search' button in iPhone/iPad Safari keyboard


I've noticed navigating in websites like Dell or Google, that typing in their search text box with iPhone, in the keyboard appears a blue button 'Search' instead of the standard 'Go' button that appears on any normal form.

What should you do to display the search button?


Solution

  • You can influence this behaviour with:

    <input type="search" />
    

    JS Bin demo

    Ignore the submit button's text being 'kettle,' I just wanted to be sure that it wasn't the submit button influencing the text of the iOS keyboard...

    This is, of course, backwards compatible since a browser that doesn't understand type="search" will default to type="text", which is useful for creating forward-planning html5 forms.