I’m in the middle of converting seamsboutiquesf.com into a WordPress theme and trying to customize the search bar, I wanted the search bar to show “Search” within the text field. This part was easy. All I had to do was put a value=”Search”.
<input type="text" results="5" id="s" name="s" value="Search" />
The problem with this is that when a user clicks the search bar, the text that you placed within the search box does not go away, forcing the user to remove the default text before typing out their search word/phrase.
Step 3: Place the class=”cleardefault” within all the text inputs.
<input type="text" results="5" id="s" name="s" class="cleardefault" />