Simple Search Form Tag

The Simple Search Form tag allows you to easily add a single-form search field to your site. This allows you to have a simple search box in a sidebar of your site. Example:

{exp:search:simple_form weblog="news"}

<p><label for="keywords">Search:</label><br />
<input type="text" name="keywords" id="keywords" value="" size="18" maxlength="100" /></p>

<p><a href="{path=search/index}">Advanced Search</a></p>

<p><input type="submit" value="submit" class="submit" /></p>


The search results are displayed on the page you specify as the results= page. Results are displayed with the Search Results tag.

Input Fields


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><br />
<input type="text" name="keywords" id="keywords" maxlength="100" size="20" />

Member Name

You may optionally search by member name (the screen name) by adding this field to your form. If you change the form field, you need to be sure to leave the name="member_name" attribute alone.

<label for="member_name">Member Name:</label><br />
<input type="text" name="member_name" id="member_name" maxlength="100" size="40" />

Exact Matching

If you offer the ability to search by member name, then you may also offer the option of matching partial member names or exact member names. If you change the form field, you need to be sure to leave the name="exact_match" attribute alone.

<input type="checkbox" name="exact_match" id="exact_match" value="y" /> <label for="exact_match">Match Name Exactly</label>




The Template_Group/Template to which you would like the search results to point. If you do not specify this parameter, then it will default to "search/results", which is the default location of the search results Template.



The number of results to show per page on the search results.


search_in="entries" search_in="everywhere" search_in="titles"

This parameter specifies which fields you would like to include in the searching. There are three possible values:

  1. entries: The search will be conducted in the entry fields of your weblog. The entry titles and any associated comments will not be included.
  2. everywhere: The search will be conducted in the title, entry fields, and in associated comments.
  3. titles: The search will be conducted in the title of your entries. The weblog entry fields and any associated comments will not be included.

If this parameter is not set, the search will default to only search by "titles".



The weblog status to which you would like to restrict searching. You can choose multiple statuses using a pipe:


Or exclude statuses using "not"

status="not submitted|processing|closed"



From which weblog to search the entries. Additionally, you can use the pipe character to separate multiple weblogs:


Or you can add the word "not" (with a space after it) to exclude weblogs:

weblog="not weblog1|weblog2|weblog3"


There are no specific variables associated with the Simple Search Form. You may use the {path=} Global Variable to create a link to an Advanced Search Form if you wish.