What is the best way to implement Google Address Autocomplete?

Hi All,

I wanted to implement Google Autocomplete Address feature on one of my forms and wanted to understand the best way to do it.

I have a couple of concerns regarding setting this up.

1. How do I protect my Google Key if I’m adding it to the SCRIPT
2. How do use the custom scripts with on Change invent of Input Fields
3. Should I use this script in OnChange Event or On Page Load
4. Is there similar guide how to use these google widgets to weweb

Any advice will be highly appreciated.

Google Guide

  1. The API key is probably mean to be used in the front end as they are using it to load the script in their documentation example. Probably you have to define which domain can use it when you generate it.
    1. You probably should use this script “on mounted” on your input :thinking:
  2. Many people already implemented things like this one TUTORIAL - How to create the Google Adresses AUTOCOMPLETE INPUT - #7 by SNeJ

I tried, different ways and I’m still stuck with this