Jump to content

How to add the words 'Search...' to the search bar


generalexperts

Recommended Posts

I am wondering how to add text to the search bar. Like the search bar in this forum (above) it says 'Search...' then when you start typing the word goes away. Does anyone know what I need to add to make it do that and where? I would imagine it would be modified in the superfish-modified.css in the blocktopmenu module. Thanks! Also, I would like to make the search bar stretch wider when the pointer hovers over the search bar. Any help is appreciated!!

  • Like 1
Link to comment
Share on other sites

Good morning

 

Using PS 1.5.5.0 Default theme

 

To achieve this you need to go to:

 

public_html/Your Shop/modules/blocksearch/blocksearch-top.tpl

 

Around line 44 you will see this code:   {*Comment out this Code*}

 

{*<input class="search_query" type="text" id="search_query_top" name="search_query" value="{if isset($smarty.get.search_query)}{$smarty.get.search_query|htmlentities:$ENT_QUOTES:'utf-8'|stripslashes}{/if}" />*}

 

Add this code directly underneath:

 

<input class="search_query" type="text" id="search_query_top" name="search_query" value="{if isset($smarty.get.search_query)}{$smarty.get.search_query|htmlentities:$ENT_QUOTES:'utf-8'|stripslashes}{else}{l s='Search for your product...' mod='blocksearch'}{/if}" onfocus="if(this.value=='{l s='Search for your product...' mod='blocksearch'}')this.value='';" onblur="if(this.value=='')this.value='{l s='Search for your product...' mod='blocksearch'}';" />

 

You will see "Search for your product" in three places ( Change this text to whatever you require )

 

Result

http://mobileskunk.co.uk/index.php

 

Hope this helps

 

Paul

Link to comment
Share on other sites

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...