View Single Post
  #8  
Old November 7th, 2012, 10:32 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

You can create a new widget, add a text module to that widget with the following code:
HTML Code:
<script type="text/javascript">
<!--
/*
 * NOTE: This JS code would be much better off
 * existing in your theme's header.php file.
*/
function wash( anInput ) { if(anInput.value == anInput.defaultValue) anInput.value = ''; }
function checkWash( anInput ) { if(anInput.value == '') anInput.value = anInput.defaultValue; }
//-->
</script>

<div class="store_search_form">
  <form method="get" action="http://www.YOURSITE.com/store/search">
	  [search.word onfocus='wash(this);' onblur='checkWash(this);' value='Search store...']
	  <input type="hidden" name="saleprice" value="1-" />
	  [search.submit title='Go']
  </form>
</div>
Make sure you change http://www.YOURSITE.com/store/search to your site's search page.

Then add that new widget to only your search page using the Widget Context plugin.

Eric