{{ html.search }} – Search Box

Table Of Contents

The {{ html.search }} function generates an input field or a dropdown list, allowing users to filter table data based on specified search criteria.

Search Box

Usage

{{ html.search(Field_s,CSS_Class,Reload,In-list_search,Exact_Match,Min_String_Length) }}

Parameters:

  1. Field_s (Required)
    Specifies which table field(s) to search within. Use a comma to separate multiple fields.

    • Example: {{ html.search('firstname,lastname') }}
    • When using Table Join (Lookup Table) or Table Join List fields, you can specify a rendering layout (e.g., {{ html.search(‘fieldname:layoutname’) }})
    • Example: {{ html.search('firstname,lastname') }}
    • Example: {{ html.search('fieldname:layoutname') }}
  2. CSS_Class (Optional)
    Defines custom styling by specifying one or more CSS class names, separated by spaces.
    • Example: ‘search-input highlighted’
  3. Reload (Optional, for select boxes only)
    Determines whether the page reloads automatically when a new option is selected.
    • (Do nothing – default)
    • reload: Reload Page
  4. In-list_search (optional, for select boxes only: Table Join, Radio, User Group etc)
    Enables an advanced dropdown with built-in search functionality for easier option selection.
    • “standard” (default) – Standard dropdown
    • “improved” – Enables enhanced selection
  5. Exact Match (Optional)
    Defines how the search term should match against field values:
    • “contains” (default) – Matches if the field contains the search term
    • “exact” – Matches only if the field exactly matches the search term
    • “startwith” – Matches only if the field begins with the search term
    • “endwith” – Matches only if the field ends with the search term
  6. Min_String_Length (optional)
    Specifies the minimum number of characters required for search execution.

Examples #

Text field search

{{ html.search("name","form-control") }}

Dropdown List with Auto-Reload and Enhanced Selection

{{ html.search("country","form-select","reload","improved") }}


What are your feelings

Leave a Reply

Updated on February 14, 2025