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

    I've built the following call into the masthead of the document (i.e. a common search box at the top of the page):

    [[!AdvSearchForm?
      &tpl=`logixsearch`
      &searchValue=`Search`
      &landing=`14`
    ]]
    


    The template logixsearch contains:

    <form class="showtextback" action="[[~[[+landing]]]]" method="[[+method]]">
      <fieldset>
        <input type="hidden" name="id" value="[[+landing]]" />
        <input type="hidden" name="asId" value="[[+asId]]" />
        <input type="text" class="search_text" id="[[+asId]]_search" name="[[+searchIndex]]" value="[[+searchValue]]" />
        <input type="image" src="images/pixel.gif" name="sub" class="searchsubmit" value="[[%advsearch.search? &namespace=`advsearch` &topic=`default`]]" alt="" />
      </fieldset>
    </form>
    


    The results page contains:

    [[!AdvSearch]]


    I get no results on the results page unless i input a single letter and then I get an error message. For example if I input Product A" into the search I get this a result on the results page:

    Search with "A" is invalid. Minimum number of characters allowed for a search term: 3

    Now, if I use the default template, I get results, but the result is always that the search term could not be found.

    Any insights?
      • 5811
      • 1,717 Posts
      Add &ids=`xxx` in the advsearch snippet call of the resutts page.

      This issue has been fixed, see the github repository to know how to fix this bug

      If your id declaration is complex, you could use GetIds. e.g:

      [[!AdvSearch? &ids=`[[!GetIds? &ids=`xx,yy,zz`]]`]]
        • 35322
        • 20 Posts
        Hi,

        I have this same problem. I'm using the latest from GitHub. The form sent looks like this :-

        <form class="advsea-search-form" action="[[~[[+landing]]]]" method="[[+method]]">
          <input type="hidden" name="id" value="[[+landing]]" />
          <input type="hidden" name="asId" value="[[+asId]]" />
          <input type="text" id="[[+asId]]_search" name="[[+searchIndex]]" style="width: 150px;" value="[[+searchValue]]" />
        </form>
        


        Which is called with

        [[!AdvSearchForm? &landing=`70` &addJQuery=`0` &help=`0` &method=`POST`]]
        


        My site is already using JQuery 1.6.1. The results is set in a separate resource and is called like this:

        [[!AdvSearch?
            &perPage=`5`
            &ids=`[[!GetIds? &ids=`1,10,19,21,26,28,29,30,31,32,36,37,38,39,40,41,42,56,57,58,62,63,69`]]`]]
        


        However, as above, I only get text displayed if I use search criteria of 2 or less characters. Any more than that results in an empty field.

        Thoughts would be welcome smiley

        Thanks [ed. note: Lazarus404 last edited this post 12 years, 6 months ago.]
          • 35322
          • 20 Posts
          Does anybody have any idea what I might be doing wrong? Could this be a bug in AdvSearch? I need to get the project live this week, so any help would be greatly appreciated.

          Thanks,
          Lee