Re: Google Places Auto Complete into Forms 2.0

Anonymous
Not applicable

Google Places Auto Complete into Forms 2.0

I want to including a Google Places Autocomplete form on my landing page, I want to have the auto complete feed a Marketo Form, so that I can populate the address information along with any other information we may currently have on the lead on a follow-up landing page. These leads may or may not currently be active leads.
We are asking them to enter their address on this form to get more information about our service (based also on their physical address.)

I am new to this and have the Google field populate fields in a table that is essentially from the Google sample site. See this sample Landing Page.

Pillow | Vacation Rental Management on Airbnb, HomeAway, VRBO, and More

The idea is to have the viewer start typing in their address, then on submit, have the form populate and open part 2, where this form will be completed on the page. I will add additional data that we will need to capture. But know that there is a simple solution that I am missing.

pastedImage_1.png

<script src="//app-ab17.marketo.com/js/forms2/js/forms2.min.js"></script>

<form id="mktoForm_1085"></form>

<script>MktoForms2.loadForm("//app-ab17.marketo.com", "869-FPO-715", 1085);</script>

I would like to combine these fields in the Address field if possible. "street_number" and "route"

Can someone help? I am striking out every time I try it.

6 REPLIES 6
SanfordWhiteman
Level 10 - Community Moderator

Re: Google Places Auto Complete into Forms 2.0

You've read the comments and checked the demo here? https://nation.marketo.com/message/95217

Anonymous
Not applicable

Re: Google Places Auto Complete into Forms 2.0

Yes, but I cannot translate this into what I need.

I used the code to try and re-build. This is using the Google to auto-populate a field in the form, and then populate other fields within the form to fill other fields.

Is there a way to utilize the auto-populate field provided by Google to push into a form? Is this the best way to populate a follow-up page?

SanfordWhiteman
Level 10 - Community Moderator

Re: Google Places Auto Complete into Forms 2.0

You'd need to provide more detailed requirements (and really, you might need to hire a developer to get this right, if you can't work it out from the template).

Is there a way to utilize the auto-populate field provided by Google to push into a form? Is this the best way to populate a follow-up page?

In my demo, the Google Places chooser is linked to a visible field, but there's no reason it couldn't be linked to a hidden field.  In turn, the hidden field can be used to determine the Thank You URL that the lead sees next.

Anonymous
Not applicable

Re: Google Places Auto Complete into Forms 2.0

In the template you built and the google form example, the data push is into a form on the same page. I want to populate a secondary/follow-up page, as these people are not yet leads, we do not have a lead to push the data into within Marketo. The subsequent page will house the data from the Google output, and allow the "Pre-lead" to fill in their name and email address and become a lead, I had though of capturing the data into the lead and then pushing the now, "Known lead" info to the second page with progressive profiling. but because we do not have the email or any other "lead" specific data, prior to page 2, this won't work.

The template is great tool, but with it, I cannot cross this bridge.

Would it be better to just create a "long" landing page that replicates and had the additional data fields, then have the data populate in the same page, but anchor it to the submit above? I have this rolling around as a "Plan B"

SanfordWhiteman
Level 10 - Community Moderator

Re: Google Places Auto Complete into Forms 2.0

In the template you built and the google form example, the data push is into a form on the same page. I want to populate a secondary/follow-up page, as these people are not yet leads, we do not have a lead to push the data into within Marketo.

So just store it in a cookie or in LocalStorage after the user chooses a place. Those are your standard ways to persist data across navigation & browser sessions. When they finally see your real form, read the data out of storage and put it into the form using Forms 2.0 form.setValues().

There's no reason (other than it being the most common use case) that the Place object needs to be posted to a server right away. It needs to have a form field so the user has a widget to type in & browse, of course (that can be any HTML <input type="text">) but you don't need to post the result, just save it!

Anonymous
Not applicable

Re: Google Places Auto Complete into Forms 2.0

Sounds good. Thank you.

Todd Baker

805-558-2855