ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Simple search not working

January 26, 2009 10:42am

Subscribe [2]
  • #1 / Jan 26, 2009 10:42am

    sthmtc

    11 posts

    On the site that I’m currently developing, the search is not working. Whenever I try to search for something I’m getting this error:

    “You did not submit a search term.”

    I did however entered one 😊

    My search form looks like this:

    {exp:search:simple_form result_page="search/results" weblog="profile|grants|projects|glossary" search_in="everywhere"}
        <input id="search_query" type="text" name="q" value="" size="15" />
        <input id="search_go" type="submit" value="Go" class="submit" />
     {/exp:search:simple_form}

    And there is the default template in search/results.  I’ve also noticed that I’m not being taken to one of these typical search urls such as /search/results/xxxxx but to the homepage instead. Could this be related to this technique for multilingual sites I’m using?

    Any help is greatly appreciated!

  • #2 / Jan 26, 2009 10:50am

    Ingmar

    29245 posts

    The primary search method is to search by keyword. If you change the form field, you need to be sure to leave the name=“keywords” attribute alone:

    <label for="keywords">Keywords:</label>
    
    <input type="text" name="keywords" id="keywords" maxlength="100" size="20" />

    You need a form with a name= parameter of “keywords”.

  • #3 / Jan 26, 2009 11:41am

    sthmtc

    11 posts

    Great, that worked! Thanks for the swift reply, Ingmar.

  • #4 / Jan 26, 2009 1:19pm

    Greg Aker

    6022 posts

    sthmtc:

    I’m glad Ingmar got you squared away.  Closing this thread out, but please don’t hesitate to post again if anything else comes up!

    -greg

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases