WPRentals offers several ways to manage listing locations in the submit form and search forms.
The available location systems are:
- Google Places or OpenStreet Places autocomplete
- Theme auto-save location based on saved listing location details
- Dropdown selector for city and area
This help explains how to use Google Places or OpenStreet Places autocomplete for listing location and search.
How Autocomplete Works
When autocomplete is enabled, users can start typing a location in the location field and select one of the suggested results.
The suggestion list is provided by the selected location service:
- Google Places, if you use Google Maps.
- OpenStreet Places, if you use OpenStreetMaps.
After the user selects a suggestion, WPRentals can use the selected location to save listing location details and to search listings by location.
Step 1: Enable Autocomplete for the Location Field
Go to:
WPRentals Options > Search > Location Field Search Settings
Set:
- Use Google Places or Open Street Places for Location Field in Search? – Yes
- Use Dropdowns for Cities and Areas in Submission Form? – No
Click Save Changes.
Optional: Limit Autocomplete to One Country
You can limit Google Places or OpenStreet Places suggestions to a specific country.
Use this option if your website lists rentals only in one country and you want autocomplete suggestions to stay focused on that country.
Step 2: Select the Map System
Go to:
WPRentals Options > Map Configuration > Map General Settings
Find:
What Map System do you want to use?
Select one of these options:
- Google Maps
- OpenStreetMaps
If You Use Google Maps
- Add a valid Google Maps API Key.
- Make sure the Places API/library is enabled for that key.
How to generate a Google API key
If You Use OpenStreetMaps
- Select OpenStreetMaps as the map system.
- Enable OpenStreet Places.
- Click Save Changes.
Step 3: Disable City and Area Dropdowns in Submission
When using Google Places or OpenStreet Places, the location should be selected from the autocomplete suggestion.
Go to:
WPRentals Options > Search > Location Field Search Settings
Set:
Use Dropdowns for Cities and Areas in Submission Form? – No
Use Autocomplete in the Add Listing Form
After the settings are configured, owners and site admins can select the listing location from the front-end submit form.
Go to:
User Dashboard > My Listings > Add New Listing
or:
User Dashboard > My Listings > Edit Listing
- Fill in the required listing fields.
- In the City or location field, start typing a city or location name.
- Select the correct result from the autocomplete dropdown.
- The country and other location details can be populated based on the selected result.
- Complete the remaining listing details.
- Save, submit, or update the listing.
Use Autocomplete in Search Forms
Visitors can also use the autocomplete location field in search forms.
- Go to a page that includes a WPRentals search form.
- Start typing a location in the location field.
- Select the matching result from the autocomplete dropdown.
- Click Search.
- The search results page will show listings that match the selected location.
Search Forms That Support the Location Field
The Google Places or OpenStreet Places autocomplete setting applies to search forms that include a supported location field.
Hero Media Search
Hero Media Search is available in several variations.
- Type 1 – default search, hardcoded fields.
- Type 2 – default search, hardcoded fields.
- Type 3 – supports custom fields only.
- Type 4 – default fields and custom fields.
- Type 5 – supports custom fields only.
These search forms can also appear as:
- Mobile Search
- Search Shortcode
- Search Widget
Half Map Layout Search
The Half Map search form is configured with custom fields.
Search Form Builder in Elementor
The Elementor Search Form Builder is configured with custom fields.
WPRentals Search Form Builder for Elementor
Examples of Location Fields in Search Forms
The location field can appear as the default field:
Where do you want to go?
The location field can also appear as a custom field:
Location
In the Elementor Search Form Builder, use the field:
Location
Troubleshooting
If location suggestions do not show, check the following:
- The correct map system is selected in Map Configuration.
- Google Maps has a valid API key, if using Google Maps.
- The Google Places API/library is enabled for the API key.
- OpenStreetMaps is selected if using OpenStreet Places.
- Use Google Places or Open Street Places for Location Field in Search? is set to Yes.
- Use Dropdowns for Cities and Areas in Submission Form? is set to No.
- Users select a result from the autocomplete dropdown instead of typing manually.
- Cache was cleared after changing the settings.
- The browser console does not show JavaScript or API errors.
Important Notes
- Google Places requires a valid Google Maps API key with the Places API/library enabled.
- OpenStreet Places requires OpenStreetMaps to be selected as the map system.
- Set Use Google Places or Open Street Places for Location Field in Search? to Yes to use autocomplete.
- Set Use Dropdowns for Cities and Areas in Submission Form? to No when using Google/OpenStreet autocomplete for location saving.
- Owners and site admins manage listing locations from the front-end dashboard.
- Visitors search locations from search forms that include the supported location field.
- The autocomplete setting applies only to search forms that include a supported location field.
Related Help
Theme auto-save location based on saved listing location details
Dropdown selector for city and area










