Getting Started

Configuration

Administration

Modules

Templates

Integrations

Development

Custom Search Forms in UNA

Create custom search forms for any installed content module in UNA. In this example, we will add a new search form for "Persons".

Prerequisites

  1. Install the Developer module (if not already installed).
  2. Go to Studio > Developer > Forms > Search Forms.
  3. Select the module where you want to add a new search form (Persons in our case).
  4. Click "Add New Search".

Creating the Search Form

  1. In the popup, fill in the following fields:
    • Name: Unique name of the search form (e.g., bx_persons_search_adv).
    • Content Info object: The "source" for the searched info (Persons in our case).
    • Module: Module where the search will be performed (Persons).
    • Title: The language key for the caption of the search form (_bx_persons_search_adv).
  2. Optional fields "Class Name" and "Class File" are for advanced customization of the search form.
  3. Click "Save".

Adding Fields to the Search Form

  1. In the list of search forms, click on "0 fields" under the "Fields" column for the new form.
  2. Click "Reset" to import fields from the "Add Items" of the current module (e.g., "Add person").
  3. Each field has an "Edit" icon for editing field settings.

Placing the New Search Form on a Page

  1. Go to Developer > Pages > Persons area.
  2. Choose the page where you want to display the new search form.
  3. Click "Add blocks" and find the "Persons" module in the left column.
  4. In the right column, find the "Search form" and "Search results" blocks and check both.
  5. Click "Add to page".
  6. In the settings of the new "Search form" block, find the "Code" field and replace the line 'object' => 'bx_persons', with 'object' => 'bx_persons_search_adv',.
  7. Click "Save".

Your new search form will appear in the chosen place.

For a more descriptive tutorial from the community, visit: https://una.io/page/view-discussion?id=1461