Skip Navigation

[Resolved] Creating multiple field search with results on another page

This support ticket is created 2 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 1 reply, has 2 voices.

Last updated by Christian Cox 2 years, 7 months ago.

Assisted by: Christian Cox.

Author
Posts
#2168939
search.jpg

We need to create a multiple field search (see screenshot) with the possibility to have also the "all" option in the select field.
The search results shall be visible only after the SUBMIT button click.

Please let us know how to achieve this with a view (we use the latest Toolset Block editor). The fields to be used for search parameters are single line fields and we see that it is possible to auto populate their values from the database.

Thanks for any help on this.

Franco

#2169155
Screen Shot 2021-09-14 at 2.38.01 PM.png

Hello, we have some instructions available here showing how to create a custom search that displays only the search filters on one page, and then redirects to another page to display the selected filters and results:
https://toolset.com/course-lesson/displaying-search-results-on-a-different-page/

You will start by creating or editing the custom Page that will be used to display the results. This is where you will build the View in a View Block. You will create both the filters and the results here in the View block. See below for more instructions about creating the filters.

Then, you will edit the Page or Post where you want to display the search filters separately. Insert a View block in the editor and choose to display your existing View. You will have the option to display only the search filters here, and choose a redirect Page. Choose the Page where you built the original View.

When building the View, you will insert each search filter in the View Search block. When you insert a new search filter, choose one of the single line fields and use the sidebar field settings panel to display the filter as a select field. I am attaching a screenshot here showing the configurations you should use in the sidebar to display a select field with the default text " -- All -- " and options defined by the field values in the database.

Add the three search filters and then add a Search button in the View Search block. Then use the View Loop block to design the results.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.