Tell us what you are trying to do?
Hello I am trying setup a map with a store listing based on user location and include a Distance Search field in case the user has location services off or would like to change parameters such as zip or radius.
I setup the View with the query radio button 'Distance center is set from user location.' checked and "Don't include the current page in the query result' checked. This works fine. It shows local results.
When I try to add a Custom search it changes the Query in the View. I cant find any documentation on what parameters can be added in the Custom Search Filter > Field Settings to replicate the Query in the View. Is there a list of what can be added to those inputs (Distance Center URL parameter to use, Distance radius URL parameter to use, etc) ? I am new to toolset so have not worked with the shortcodes before, only blocks.
I don't want the first view to show posts on title or date etc. I would rather it show nothing on load as the list of posts is not at all representative of the number of locations.
What is the link to your site?
hidden link
Hello,
You can display the search form in one page, and display the search result in another page, for example:
Create another page
Add a view block-> Use existing View-> Find and select your view block,
1) Enable option "Only the search form", see my screenshot search-form.JPG
2) Enable option "On another page", find and select the target page
see our document:
https://toolset.com/course-lesson/creating-a-custom-search/#set-up-the-view-search-and-results-side-by-side
section "Set up the View search and results side by side"
Ok i will try that, however I don't see the screen shot you mentioned.
Thanks
Kevin
I tried the solution you suggested however when I go to select the target page the input box says "No Options" and I cant manually enter anything.
If I use this solution does that mean when a user first lands on the page that the only thing they will see is the Search form? Ideally the page should show closest locations then have the ability to edit the search.
Q1) the input box says "No Options" and I cant manually enter anything.
This is abnormal, please check these:
1) Make sure you are using the latest version of Toolset plugins, you can download them here:
https://toolset.com/account/downloads/
2) In case it is a compatibility problem, please deactivate all other plugins, and switch to wordpress default theme 2021, deactivate all custom PHP/JS code snippets, and test again
3) Also check if there is any PHP/JS error in your website:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/
Q2) If I use this solution does that mean when a user first lands on the page that the only thing they will see is the Search form?
Yes, you are right, it means it display the search form only on the first landing page.
If you want show closest locations, you can create another view block in that page, and show the closest locations.
I tried all of the above including:
- Changing the Theme
- Deactivating all non-toolset plugins
- Updating to latest version of Toolset plugins.
It still gives me 'No Options' under Display Results on another page.
There are also no errors in the console or anything that I could determine to be a problem in the Views Debug. If I try to incorporate the view with only the Search and not Results page specified, the form does not show.
Can I supply you with credentials to take a look? I am running up against a deadline and may need to look for another solution. I will be back online when you are working in your time zone to hopefully move this along.
Thanks
Kevin
OK, please backup your website first, then provide your website credentials in below private message box, also point out the problem page URL, thanks
I have tried these in your website:
1) Open URL
hidden link
2) Find and select view block
3) In the sidebar, option "On another page", input text: dea
It works fine, I can see the results without any problem, see my screenshot search.JPG
Can you confirm it? thanks
Ok - I feel stupid. I was expecting a populated dropdown box.
Thanks for taking a look. I will try and wrap it up tomorrow.
Kevin
OK, please let me know if you need more assistance for it.
Hello,
Ok I am just about there, although I have found the using the views to be buggy and frustrating. In one instance I deleted the Custom Search from a View and it kept reappearing, when viewing the View with HTML it was not there. Another instance I had a View that was only supposed to show the Custom Search also show the View Results.
1. A couple more questions. Is it possible to sort the results by distance.
2. In the map popup, is it possible to use shortcodes? I would like to show a field only if it meets a certain criteria.
Thanks
Kevin
Also, I am trying to add a telephone number link to the popup on the map. When I add quotes arround the phone number in the link it turns them into single quotes and I cant create the link.
I assume the original question of this thread is resolved, according to our support policy, we prefer one ticket one question:
https://toolset.com/toolset-support-policy/
For other new questions please check the new thread here:
https://toolset.com/forums/topic/maps-block-setup-with-user-location-and-search/
Unfortunately I could not get the maps to reliable work. I was able to set up 2 views, one to display local results with the search from another view so the user could search but they did not work reliably. The view with just the search would eventually show results on the same page. It was taking too much time and grew frustrating.
I ended up using another store locator plugin.
My issue is resolved now. Thank you!