Page 1 of 1

Search Field problem

PostPosted: Thu Jul 14, 2011 9:07 am
by joediffdez
I added the search field to my website. For some reason the word "search" is appearing above the search box although I didn't code that in and I don't want it there. It appears as if the template tag [-- STORE.search --] is adding that word.

Image

The code I input from the tutorial is:

Code: Select all
[-- IF ANALYTICS_MULTI_DOMAIN --]
<form action="[-- SHOPPING_CART_URL BASE --]/productsearch.cgi?storeid=[-- STORE.ID --]" method="post" onSubmit="javascript:__utmLinkPost(this)">
[-- ELSE --]
<form action="[-- SHOPPING_CART_URL BASE --]/productsearch.cgi?storeid=[-- STORE.ID --]" method="post">
[-- END_IF --]
<input type=hidden name="storeid" value="[-- STORE.ID --]">
<nobr>
[-- STORE.Search --]<br><input type="text" name="search_field" class="search" size="13">
<input type="submit" value="[-- STORE.Go --]">
</nobr>
</form>


The html that the tags are generating are:

Code: Select all
<form action="http://thebestebooksonline.com/cgi-bin/sc/productsearch.cgi?storeid=*16fcc2eed18b601912a7f51a4f" method="post">
<input type=hidden name="storeid" value="*16fcc2eed18b601912a7f51a4f">
<nobr>

Search<br><input type="text" name="search_field" class="search" size="13">
<input type="submit" value="Go">


it appears between the <nobr> and <br> html tags.

Is there any way to edit this or remove it?

link the the store --> www.thebestebooksonline.com/store/index.html <--

Re: Search Field problem

PostPosted: Thu Jul 14, 2011 2:12 pm
by ShopSite Lauren
I would suggest using the following code. You are correct, the [-- STORE.Search --] tag is what is adding that text, and you can simply remove that, it is not needed for the form. I also took out the IF statement for the multi-domain (I assume you aren't using this because most merchants don't), as well as moved the "search" text to within the field. When a customer clicks to type in that field, all the text will be removed automatically.


<form action="[-- SHOPPING_CART_URL BASE --]/productsearch.cgi?storeid=[-- STORE.ID --]" method="post">
<input type=hidden name="storeid" value="[-- STORE.ID --]">
<nobr><input type="text" name="search_field" class="search" size="13" value="[-- STORE.Search --]" onFocus="value=''">
<input type="submit" value="[-- STORE.Go --]">
</nobr>
</form>

Re: Search Field problem

PostPosted: Thu Jul 14, 2011 3:42 pm
by joediffdez
Thank you so much!