Skip Navigation

[Resolved] Search on separate pages

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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Karachi (GMT+05:00)

This topic contains 9 replies, has 2 voices.

Last updated by Waqar 1 year, 9 months ago.

Assisted by: Waqar.

Author
Posts
#2376171

Tell us what you are trying to do?

I am trying to add a search on one page that opens another page. I was given advice on another thread as to how to do this. However I am working on a copy of a site that was already built using toolset and I am rtying to recreate using a different page builder. (oxygen as opposed to beaver builder which the original site is built with). The original site has acheived this with 2 separate views, one which is a search form and one which shows the results. This is the original hidden link the search form on the left leads to a url show-vehicle-results which is not a page. When you click submit the results show the car selected at the top. The shortcode used has no target id - just the view - [wpv-view name="search-by-vehicle"]

I attempted to recreate - if I use no target id and just the shortcode as the original I get an error page on submit. I did set up a show-vehicle page and inserted the other view there with a target id in the search by vehicle shortcode. However while this navigated to the right view, the search vehicle parameters weren't there so it's a bit pointless!

New threads created by Waqar and linked to this one are listed below:

https://toolset.com/forums/topic/split-search-view-is-not-showing-correctly/

#2376277

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting us and I'd be happy to assist.

As Nigel guided in the other support thread, you just need to have different shortcodes for the same view, to show the search form on one page and the search results on the other.
( ref: https://toolset.com/forums/topic/search-form-on-seperate-page-built-in-oxygen-builder/#post-2365939 )

Have you updated the shortcodes on these pages, as recommended? In case the search is still not working as expected, you're welcome to share temporary admin login details so that I can see how these pages are set up.

Note: Your next reply will be private and it is recommended to make a complete backup copy, before sharing the access details.

regards,
Waqar

#2378731

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for sharing these details, but, I'm getting an incorrect username error

Can you please test the username and password and share them again?

#2381025

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

The new admin access details worked, thank you.

The two pages that you referred to are using two different views, which is why the search on them is not working together:

1. Page "eStore" ( /estore-2/ ) is using the view name "Search By Vehicle" in the shortcode (added in the Oxygen editor):


[wpv-form-view name="search-by-vehicle" target_id="18276"]

Note: the "18276" ID is the ID of the search results page "show-vehicles".

2. But the page "show-vehicles" ( /show-vehicles/ ) is using a different view, named "Show Vehicles" in the shortcode (added in the Oxygen editor):


[wpv-view name="show-vehicles"]

This is the reason when the search form on the "eStore" page is used, the page is redirected to the "show-vehicles" page, but search results are not shown on it accordingly. Please make sure that both shortcodes are using the same view.

The shortcodes used on the "Branch Locator" seem to be correct, so to investigate its layout issue, I've created a separate ticket and will follow up on it, shortly.
( ref: https://toolset.com/forums/topic/split-search-view-is-not-showing-correctly/ )

#2383657

Hi Waqar,

I do realise this and maybe I didn't explain myself more but I am making a copy of another site to restyle it. The other site was built with these two views which is why I'm so confused. I can provide you with logins for that site if you like

#2384623

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thanks for writing back.

I have the access details for the staging website at hidden link but not for the live one at hidden link.

If you'd like me to take a look inside the hidden link website too, you're welcome to share the temporary admin login details for it too. Please also mention the names of the pages that are not functioning correctly, in case they are different than the staging website.

Note: Your next reply will be private and it is recommended to make a complete backup copy, before sharing the access details.

#2385565

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

The access details that you shared are not getting accepted. And the address of this website is different than the staging and the live website that you shared earlier.

Is this a new staging website that you're working on? If yes, please check the username and password again and share them.

Note: I've set your next reply as private.

#2402023

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for sharing the admin access.

I've checked the page "eStore" ( hidden link ) and it is using the view "Search By Vehicle".
( hidden link )

The challenge here is that this view is not using the standard Toolset method to show the search results on a separate page. Instead, it is using the custom script to redirect to the search results page.
( screenshot: hidden link )

This custom script method is not future safe and is prone to fail and I don't think it is working as expected on the old website either.
( hidden link )

So while you're redoing the website for different page builders, it would be a good idea to remake those views, so that they don't have to rely on this custom script-based redirection.

For example, I've created a simple vehicle search view named "View for Vehicles search by TS support".
( hidden link )

You can see the search form for this view is placed on the page "Vehicles search form page by TS support".
( hidden link )

The shortcode used on this page for this new view is:


[wpv-form-view name="view-for-vehicles-search-by-ts-support" target_id="17792"]

When the search form is used, it shows the results on another page "Vehicles search results page by TS support". The ID of this page is '17792' which is used in the shortcode above, to tell the view's search form to use this page for showing the results.
( hidden link )

This page contains two shortcodes for this new view. The main right side column has the shortcode to show the results:


[wpv-view name="view-for-vehicles-search-by-ts-support" view_display="layout"]

The smaller left side column has this shortcode to show the search form so that if the user wants to change the search from the same search results page, it can be used:


[wpv-form-view name="view-for-vehicles-search-by-ts-support" target_id="self"]

I hope this example usage will make this functionality clearer.

#2406893

Thank you so much Waqar, I really appreciate it!

#2406979

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

You're very welcome and glad I could help.

Let me know if you have any follow-up questions and for a new question or concern, feel free to start a new ticket.

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