We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31344
    • 12 Posts
    I use Revo 2.0.4pl2 and SimpleSearch version 1.1.1 pl and this is my SimpleSearch call
    [[!SimpleSearchForm? &tpl=`searchtemp` &landing=`4` ]]

    with a chunck called "searchtemp" witch I get from the example of the rtfm.
    <form class="sisea-search-form" action="[[~[[+landing:default=`[[*id]]`]]]]" method="[[+method:default=`get`]]">    
    <label><input type="text" name="[[+searchIndex]]" value="[[+searchValue]]" /></label>
    <input type="submit" value="[[%sisea.search? &namespace=`sisea` &topic=`default`]]" />
    </form>

    On page 4 I have the following call:
    [[!SimpleSearch]]


    When I give a search command it doesn’t land on page 4, but when I remove the tpl it will land on page 4. What is going wrong.

    Thanks for helping.

    Viktor
      • 4971
      • 964 Posts
      action="[[~[[+landing:default=`[[*id]]`]]]]"


      Try getting rid of the default in your template,
      seems to be defaulting to the page where the search form is...
        Website: www.mercologia.com
        MODX Revo Tutorials:  www.modxperience.com

        MODX Professional Partner
        • 31344
        • 12 Posts
        Tried that, but still not landing on page 4. I thought the call with landing parameter overruled the default configuration. There is something a noticed, when I hover my mouse over the search button the status bar of IE shows index.php?id=4 and when search for test the url in the address bar looks like index.php?search=test.

        The searchfunction is working when I put the simplesearch call in the chunck:
        <form action="[[~[[+landing:`[[+id=4]]`]]]]" method="[[+method:default=`get`]]">    
        <label><input type="text" name="[[+searchIndex]]" value="[[+searchValue]]" /></label>
        <input type="submit" value="[[%sisea.search? &namespace=`sisea` &topic=`default`]]" />
        </form>
        [[!SimpleSearch]]


        Do you have any clue?

        Viktor
          • 4971
          • 964 Posts
          This is the call in my website:

          [[!SimpleSearchForm? &landing=`53` &method=`POST` &tpl=`topSearch`]]


          I use POST just because I dont like GET...

          And this is my tpl:

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


          and it works... as you can see is the same as yours, except that yours does not have the fieldset, but that makes no difference...
            Website: www.mercologia.com
            MODX Revo Tutorials:  www.modxperience.com

            MODX Professional Partner
            • 5811
            • 1,717 Posts
            and it works...
            Which release of SimpleSearch do you use ? 1.1.1 ?

            I found the same results as vcc033 It doesn’t work, EDIT with POST or GET with this template.
            Same thing on the same page.
              • 4971
              • 964 Posts
              Nope, 1.1.0-pl
              I have not updated it because it is working...

              so maybe it has a bug...
              please go to the support page and reference this thread or
              if you feel it is a bug, go to the github issue page for SimpleSearch.
                Website: www.mercologia.com
                MODX Revo Tutorials:  www.modxperience.com

                MODX Professional Partner
                • 5811
                • 1,717 Posts
                Apologies it works with &method=`POST` but not with the default ’GET’

                [[!SimpleSearchForm? &tpl=`simpleSearchInput1` &method=`POST` &landing=`34` ]] 

                [[!SimpleSearch]] 

                And simpleSearchInput1 as your chunk.

                  • 31344
                  • 12 Posts
                  Thanks, that solves the problem, using post instead of get.

                    • 36624
                    • 535 Posts
                    i think the documentation should be updated .. : http://rtfm.modx.com/display/ADDON/SimpleSearch.SimpleSearchForm.tpl

                    the default chunk should be now (extract from the files system) :

                    <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>


                    note the : type="hidden" name="id"

                      CTRL+SHIFT+U - Clear Cache
                      CTRL+SHIFT+H - Hiding Heft Panel
                      CTRL+SHIFT+N - Fast Create Resource
                      CTRL+ALT+P - Preview Recource (in edit resorce window)
                      CTRL+ALT+S - Save
                      • 28215
                      • 4,149 Posts
                      Updated, thanks!
                        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com