A search form is a great way to use URL parameters in a user friendly way. It allows a user to search for specific values in specific fields using plain values and wildcards.
To launch a search form we need to create two separate pages:
- A page containing the search form
- A page containing the publication
The user fills out the search form and presses the submit button. Your search form needs to use the get method to send the values to the publication page. Please note this will not work with post! Your search field names must match the URL parameter convention (found here…).
Remove publication search options
You should remove all other search options from your publication page when you use a search form. Additional search values entered on the publication page will not reset the search. The URL parameters on the publication page cannot be undone, unless you remove them.
Remove search options from your publication:
> https://wpdataaccess.com/docs/data-publisher/advanced-settings/ (see dom options)
OR
> https://wpdataaccess.com/docs/data-publisher/premium-extensions/ (for premium users: much easier)
If you are a premium user and individual column search is enabled for your publication table, add the following options to your advanced options to disable individual column search for your publication specifically:
{ “wpda_searchbox”: “none” }
Demo
> https://wpdataaccess.com/publication-search-form-demo/
Template
You can download a Code Manager template here:
> https://code-manager.com/code/?wpda_search_column_code_name=publication-search-form
This example contains the search form only. Please follow the instruction in the template.
Notes
A premium license is not required for search forms.