Adding a Web App item search

Updated on 20-October-2016 at 10:16 AM

Business Catalyst End of life announcement - find out more details.

In this article, you'll learn how to build search functionality that is designed specifically to locate items submitted as a Web App. This is useful in situations when visitors generate the content submitted into Web Apps, or when there are so many Web App items that they cannot easily be perused in a single list view.

The search form can be inserted in any web page or site template.

Inserting a Web App search form

  1. Open the page in editing mode by selecting Site Manager > Pages and clicking the page in the tree view.
  2. Place the cursor in the content editor where you want to insert the search form.
  3. In the Modules tab of the Toolbox found on the right of the editor, select Web Apps > Web Apps Search Form.
  4. Select your Web app from the list, and then click Insert.
    Business Catalyst inserts the form's HTML into the page. The search includes all custom fields, so that the visitor can filter the search based on a specific criteria.
    You can remove any of these custom fields by editing the HTML of the form and removing the code for the specific field.
  5. Click Update or Save Draft.
  6. Test the search by previewing the page or template and filtering by custom fields.

Displaying search results on a different page

When inserting a Web App item search form on a page, you can have the search results display on a completely different page. This is useful when the search form is on a site template and you want the results to display on a specific page.

  1. First create the page you would like to display the results on.
  2. Insert the Web App search form on a page/template as described in the section above.
  3. Remove the {module_webappsresults} as this will be used to display the results on the new page.
  4. Switch to code view by clicking the HTML tab on the lower part of the editor.
  5. Locate the form code.

    The form has an opening form tag and an action attribute. The action attribute looks as follows:

  6. Replace the PageID={module_oid} parameter with the Page ID of your results page. Example: 
  7. Open the page you would like to display the search results on, and then add the below:
  8. Save the page and test the form.