Hola! ¡Tenemos nuestra Comunidad en Español!

Autocomplete adress fiel with google maps ?

Occasional Contributor

Hi guys, 

 

We are using a form asking people for an adress, among other things, and we have consistency problems (typos and such) that I would like to solve. 

 

I would like to make it Autocomplete with the google maps API... Has anyone done this before ? Do you have any clue where to start ? 

 

Thanks a lot! 

Anais

Reply
0 Upvotes
4 Replies
Community Manager

Hi @AnaïsB ,

 

Do you have experience with APIs? As a starting point, I would recommend looking at our API documents

 

The more information, screenshots and details you can provide, the better the Community can assist.

 

Thank you,
Jenny


Did my post help answer your query? Help the Community by marking it as a solution
Reply
0 Upvotes
Occasional Contributor

Hi Jenny, 

 

Yes, I can play around with APIs, I'm not a developer but I've been using them quite often. 

 

The thing I'm trying to do is basically turn this : 

original.PNG

 

(This is a very useful form we set up on our website with Hubspot. It basically offers users the ability to suggest new gyms as partners for us. Works like a charm, but as you can see, the adress fields are free text, which gives us inaccurate adresses quite often.)

 

... into this :

 original2.PNG

 

My main issue is that so far, we have to treat these forms by hand, as typos and basically, freedom of text, make it impossible to match duplicates. One user might ask for "11, example street", another "Example st. 11", and so forth. Using google adresses would provide us with an exact match. 

 

Do you know how we could implement this ? Is there a way to add a bit of code somewhere in the form to get this autocomplete format ? 

 

Thanks a lot for your help!

Anais

Reply
0 Upvotes
Highlighted
HubSpot Moderator

Hi @AnaïsB ! Happy to help here. This is certainly possible, it just isn't possible out of the box with HubSpot. I've yet to see this on native HubSpot forms, but if you're familiar enough with JavaScript and HTML, you could use this tutorial from Google: https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete-addressform

 

It's pretty in-depth, so if you're not familiar with implementing this type of code and creating a form from scratch, it probably won't suit your needs, but it's always there as an option! If it's a necessary feature, you might want to consider working with a freelancer to implement it if you can't yourself. 

 

It also might be a neat feature we could have in HubSpot (adding an Address field and subsequent autocomplete features to our forms), so I'd highly recommend posting in our ideas forum about this so our product team can get some visiblity. Once you've done that I'd be happy to upvote and comment on it!

HubSpot Employee
Reply
0 Upvotes