Search Field problem

Questions and answers about ShopSite Custom Templates

Search Field problem

Postby joediffdez » Thu Jul 14, 2011 9:07 am

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 <--
www.differentdezine.com
joediffdez
 
Posts: 43
Joined: Mon Aug 23, 2010 3:47 pm

Re: Search Field problem

Postby ShopSite Lauren » Thu Jul 14, 2011 2:12 pm

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>
- ShopSite Lauren
Contact me for help with any of your
custom ShopSite template questions.
ShopSite Lauren
 
Posts: 887
Joined: Fri Aug 11, 2006 1:35 pm
Location: Orem, UT

Re: Search Field problem

Postby joediffdez » Thu Jul 14, 2011 3:42 pm

Thank you so much!
www.differentdezine.com
joediffdez
 
Posts: 43
Joined: Mon Aug 23, 2010 3:47 pm


Return to Custom Template Questions

Who is online

Users browsing this forum: No registered users and 10 guests