We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7527
    • 437 Posts
    Hi,

    I am trying to use SimpleSearch on my web page. I have the following set up which displays the box that I want:

    <div id="search" class="grid_5 alpha prefix_11">
    <form action="" method="get">
    
    	<div class="search_box">
    		<input id="search_field" name="s" type="text" class="inputbox_focus inputbox pngfix" value="Search..." />
    		<input type="submit" value="" class="search-btn pngfix" />
    
    	</div>
    </form>
    						</div>
    
    						<!-- end search -->

    and I want to integrate the following call:

    [[!SimpleSearchForm? &landing=`57` &tpl=`pfw.SimpleSearchFormTpl`]]


    The tpl pfw.SimpleSearchFormTpl contains:

    <form class="sisea-search-form" action="[[~[[+landing:default=`[[*id]]`]]]]" method="[[+method:default=`get`]]">
      <fieldset>
        <label for="[[+searchIndex]]">[[%sisea.search? &namespace=`sisea` &topic=`default`]]</label>
        <input type="text" name="[[+searchIndex]]" id="[[+searchIndex]]" value="[[+searchValue]]" />
        <input type="hidden" name="id" value="[[+landing:default=[[*id]]]]" /> 
        <input type="submit" value="[[%sisea.search? &namespace=`sisea` &topic=`default`]]" />
      </fieldset>
    </form>


    Can anyone give me an idea of where to start with this? And incidently, is there away to return images to via a TV, I was trying this:

    <div class="sisea-result">
        <h3>[[+idx]]. <a href="[[+link:is=``:then=`[[~[[+id]]]]`:else=`[[+link]]`]]" title="[[+longtitle]]">[[+pagetitle]]</a></h3><img class="alignleft" title="[[+Factfile_title]]" src="[[+tv.Fact1:phpthumbof=`w=100&h=100&zc=1`]]" alt="" /></a>
        <div class="extract"><p>[[+extract]]</p></div>
    </div>


    as the chunk, but I don't know if it's incorrect or the Search simply can't deal with images?
    Regards
    DS [ed. note: distant_smile last edited this post 12 years, 4 months ago.]
      www.PawsForWildlife.co.uk
      www.Borntobrick.co.uk
      • 7527
      • 437 Posts
      I almost have what I want with this tpl:

      <form action="" method="get">
      	<div class="search_box">
      		<form id="my_id" action="[[~[[+landing:default=`[[*id]]`]]]]" method="[[+method:default=`get`]]">
              <input id="search_field" name="s" type="text" class="inputbox_focus inputbox pngfix" value="Search..." />
      		<input type="submit" value="" class="search-btn pngfix" />
                      <input type="text" name="[[+searchIndex]]" id="[[+searchIndex]]" value="[[+searchValue]]" />
                      <input type="hidden" name="id" value="[[+landing:default=[[*id]]]]" /> 
                      <input type="submit" value="[[%sisea.search? &namespace=`sisea` &topic=`default`]]" />
      	
      </form>


      When your key in the box the 'Search' does not instantly disappear, and no matter what you type it returns no results saying that your search request was "". Obviously it is not registering what is keyed in. Can anyone help me tweak this last bit?

      DS
        www.PawsForWildlife.co.uk
        www.Borntobrick.co.uk
        • 7527
        • 437 Posts
        Ok, I think maybe I need to start from the beginning, so this was the template code available:

        <div id="search" class="grid_5 alpha prefix_11">
        <form action="" method="get">
        	<div class="search_box">
        		<input id="search_field" name="s" type="text" class="inputbox_focus inputbox pngfix" value="Search..." />
        		<input type="submit" value="" class="search-btn pngfix" />
        	</div>
        </form>
        </div>


        This renders a search box that functions but does not return any results or link to a landing page. So I have the following call:

        [[!SimpleSearchForm? &landing=`57` &tpl=`pfw.SimpleSearchFormTpl`]]

        How can I combine the two to get a working Search?
        DS
          www.PawsForWildlife.co.uk
          www.Borntobrick.co.uk