View Single Post
Old January 8th, 2011, 06:27 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
Join Date: Feb 2008
Posts: 16,902

Originally Posted by badm00n View Post
Sorry that last part probably wasn't clear. Here is the code from this thread i was using?

OK, here's one method. I might post a simpler solution if I can work that out:
  1. Log into the Factory
  2. Go to Views > Custom Views > Add a new view
  3. Name the view "Search Form" and check the "Don't use layout for this view" checkbox
  4. Add a "text" widget to the module area.
  5. Click the template icon and add the code below (same code that can be found in your Widgets > Simple Search view):
    <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; }
    <div class="store_search_form">
      [search.word onfocus='wash(this);' onblur='checkWash(this);' value='Search store...']
      [search.submit title='Go']
  6. Save the template code
  7. Update your store
  8. Paste the following code into your template files wherever you want the new search form to appear:
    <?php echo datafeedr_tag("Search Form"); ?>