Skip Navigation

[Resolved] Adding a search form to a different webpage than the results page

This support ticket is created 4 years, 1 month 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.

Our next available supporter will start replying to tickets in about 4.30 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 2 replies, has 2 voices.

Last updated by Minesh 4 years, 1 month ago.

Assisted by: Minesh.

Author
Posts
#1800973

Hi there,

I've created a webpage with filters and a text search input field. A list of custom posts displays on this page that matches the filter and search criteria. We'll call this page the Custom Post Listing Page.

What I would like to do is display the search input field on another page—called, say, the Search Form Page—and when the form on the Search Form Page is submitted, the browser would send the user to the Custom Post Listing Page and any display any posts that matched the search input string.

If I weren't using Toolset, I would ensure the form's action attribute were pointing to the correct URL (the Custom Post Listing Page), and that any parameters of the search input (including any hidden parameters) were passed along via the POST or GET method.

Can someone provide guidance to make this happen?

Thank you!

Saul

#1801805

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Toolset Blocks and view offers the feature where you can add the search form and search result on different pages.

If you can share what view you want to display with different search form on one page and search result on another page. I can setup a demo for you. Please let me know what view you want to use.

I have set the next reply to private which means only you and I have access to it.

#1802519

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

The thing is that - you will require to use the same view and you can display the view in parts as search form and search result.

When you try to add your view - it will offer you the options what things you want to add, search form and search results or only search form or only search result.

Please check the following screenshot:
=> hidden link

So, we can display only the search form from the following view and to add search result on another page, it requires the submit button so I added the submit button to the following view's "Search and Pagination" section.
=> hidden link

Now, you can not set the search result page as the archive, you will require to add another page and there you will require to add the search result when you try to add your view.