Search Form

To setup the search form you would first go to the Forms section of the Search app and add a new app form. (See Adding an App Form for general information about adding an app form).

Search Forms

You would pick "Search" as the form type.

Add search form

By using an app form you can customize the form fields without having to manually build out each tag in the template.

Displaying the Search Form

Once you have added the search form you can now display it on the Search and Search Results pages. The default search form will be used on those pages. You can create multiple search forms, but only one will be the default search form. 

You would simply use the following code:


That will output the rendered form template for the default search form. The same default search form is used on both the Search and the Search Result pages. 

If you want to use a different search form on those pages besides the default search form you can do that with the search form API. See below for more information. 

Search Form API

{ap_api:search:form key="FORM_KEY"}

"FORM_KEY" would be replaced with the form key for your form. 

You can get the API tag when viewing the list of forms in the search app or when viewing the details for an individual form.

This API can be used to place the search form anywhere in your site, including on one of the Search or Search Results pages.