Show 'Search' button in iPhone/iPad Safari keyboard

Javier Marín picture Javier Marín · Feb 1, 2011 · Viewed 39.8k times · Source

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?

Answer

Anton Bielousov picture Anton Bielousov · Oct 9, 2014

having type="search" is usually all you need to make software Search keyboard appear however in iOS8 it is mandatory to have a wrapping form with action attribute.

So the following code would have a software keyboard with “Return” button

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

But this code should have blue “Search” button instead

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