Autocomplete for a city/location in the search bar using google places API

Hey,

First, you’ll need to add the “search with results” element to your page:
CleanShot 2023-09-28 at 17.46.12

Then, you’ll need to update the “on change” workflow for when something gets typed in the input to hit the API you want to use with the REST API plugin:
CleanShot 2023-09-28 at 17.45.08

Then, you’ll need to update the collection list containing all the results by binding it to the API’s results:
CleanShot 2023-09-28 at 17.45.31
CleanShot 2023-09-28 at 17.44.44

How to query the API and how the results will be displayed depend on which API you’re gonna use (all APIs are different, you’ll need to check their documentation).

Do you have any idea of which service you wanna use?

1 Like