Jan 16, 2019 4:21 AM
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!
Jan 22, 2019 1:36 PM
Jan 23, 2019 4:00 AM
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 :
(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 :
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!
Jan 23, 2019 2:38 PM
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!
Oct 3, 2019 1:49 AM
I am also trying to do this and am very familiar with building forms from scratch - just not Hubspot ones. Is there a tutorial for hand-coding a hubspot form using my own editor? If so that would be very helpful as the Google API bit for the address completion isn't so bad.
Oct 3, 2019 1:17 PM
Happy to help here, as @cbarley no longer works at HubSpot.
We don't have any guides on building forms from scratch, but you can hook any custom form you create to HubSpot via our Forms API (we don't have any special rules on the structure or format of your HTML form). The v3 Forms API endpoint I shared supports AJAX, so you could parse and send over the form fields right on your page without having to call your server.
Isaac TakushiAssociate Certification Manager