In order to display your search results, you need to tell your search form where to display the result by providing the URL of your map page. To do that follow these steps:
- Edit your search form
- Click on the menu “General settings”
- In the field “Redirect URL” enter the URL of the page on which you want the search form to redirect to. In other words, the map page where you want to load the search result. If you’re displaying the search form and the map in the same page, leave that field empty to load the result on the same page!
- In the field “Redirect type”, specify how to open the redirect URL. You can either open the redirect URL on the same window – which is the default behavior – or to open it in a new window or inside a modal/pop-up.
- Scroll down to the field “What to do after clicking on the search button?” and select an option:
- If you want the search form to directly redirect the user to the result page even if there’s no result to show, select the option “Go to the result page (“Redirect URL”)”.
- If you want the search form to first check if there’s any results with the user’s search request, select the option “Check for results. Redirect or try again”. If nothing have been found, a message will inform the user about this so that they can try another search request. If something have been found, the search form will direclty redirect to the result page.
- Read the following before saving the search form …
Keep the search request when visiting other URLs
By default, the search form will redirect to the URL specified in the field “Redirect URL”, which is fine, but imagine a situation where:
- You have different map pages.
- You have a search form in your homepage. A search form with only “keyword search”, “Publish date search” and a specific “custom field”.
- You want to use the same homepage search request on all your map pages so that when visiting each map page, only the posts/locations with specific “keyword”, “publish date” and/or “custom field value” will be displayed.
In this situation, you’ll have to specify the URL of each map page on which you want to keep using the same search request. In orde to do that:
- Enter a URL in the field “Keep the search request when visiting other URLs”
- To add a new URL, click on the button “Add another URL”
- Repeat the same steps as much as you need.
- Once finished adding all URLs, save your search form