Create a Search Form

  • Views Views: 12,651
  • Last updated Last updated:
  • How to build a search form that will filter the data of a list by the values entered in the form:
    • Create a new form
      • Set "Record in database" = NO (in Form processing)
      • Save (+Save & Close with Content type = Default)
    • Copy over the list's Elements you want to use for searching
      • In "Elements" filter for the form/Groups belonging to your list
      • Select (checkbox) the Elements you want to copy, click "Copy"
      • In "Copy to group" select your searchform group, "Save"
    • In "Elements" filter for your searchform group
      • Edit (unlink) and adapt all Elements
        • you can unpublish or trash id and date_time (and empty trash)
        • for all Elements you want to use: make sure they are visible to the user and/or have correct default values
        • check validations (e.g. "isunique value" doesn't make sense and will throw a MySQL error)
    • Edit your searchform
      • add a "redirect" plugin
      • edit the "Save" button text
    • Create a menu item pointing to your search form
Back
Top