How do I pre-fill forms?

Anonymous
Not applicable

How do I pre-fill forms?

When a user signs into my website, he/she has to enter their username (email) and password.

On a specific landing page, I have a form that asks for email address and check box that asks whether or not the user wants to be contacted by a sales rep.

The pre-fill option from marketo is turned on.

But it doesn't work.

All pages on my website has a tracker that detects the email address associated from the lead.

Why isn't it working? Should I use the Get and Post method?

12 REPLIES 12
Josh_Hill13
Level 10 - Champion Alumni

Re: How do I pre-fill forms?

Is this a marketo embed form on an external site?

Does the Form itself have pre-fill turned on at the form or field level?

Anonymous
Not applicable

Re: How do I pre-fill forms?

This is a marketo embed form.

The form itself is pre-fill turned on at the form.

Josh_Hill13
Level 10 - Champion Alumni

Re: How do I pre-fill forms?

Ok, I always forget this. pre fill does NOT work on embedded form pages off marketo website.

Embed Form on your Website - Marketo Docs - Product Docs

Anonymous
Not applicable

Re: How do I pre-fill forms?

Okay so how would I turn this form into an iFrame?

Anonymous
Not applicable

Re: How do I pre-fill forms?

Pre-Pop should work if they have been munchkin tagged.  I am not sure on the process here but is it possible that a user who has logged in has not been married to their cookie on a form fill (I would assume that your username/password form is not a Marketo form)

Anonymous
Not applicable

Re: How do I pre-fill forms?

Anthony,

Using an Iframe is pretty straight forward, just put the Marketo form on a Marketo page and then reference the page in an iframe code  snippet on your desired page.

Click here for details on an iframe, the tricky part is setting it to the right height and width for your form ...and positioning your form so it shows in the frame.

this requires basic html expertise.

Anonymous
Not applicable

Re: How do I pre-fill forms?

Please refer to link : Marketo Landing Page and Form Hosting Options - Elixiter, Inc.

This site explains there is a marketo iFrame. Is that not within the interface?

SanfordWhiteman
Level 10 - Community Moderator

Re: How do I pre-fill forms?

Anthony, there really isn't any such thing as a "Marketo IFrame."  I mean, in practice, that may be what we call it, but what it really is is a Marketo Landing Page that holds only the one Marketo form, and then that LP is placed inside an IFrame in a 3rd-party site.

By only having one form take up the entirety of the LP, then when you embed the IFrame with the right cropped dimensions (as Don points out) you can make it look like the form is part of the enclosing site. 

But there isn't any such thing as "IFraming a form" -- you in fact IFrame an HTML document (LP) that happens to include only the form. Because the form thinks it's still on the Marketo site, it's able to do special things like prefill that only Marketo-hosted forms can do.

Bear in mind that -- if this isn't clear -- Marketo form prefill is taking data stored on the Marketo lead and populating form fields from it.  If someone enters their email address and password to get into your site, that doesn't have anything necessarily to do with Mkto.  The Mkto form has no way of knowing that some random variable you might store in a server session pertains to the "Email" field on a form.

SanfordWhiteman
Level 10 - Community Moderator

Re: How do I pre-fill forms?

P.S. If you follow me on the Community I can keep you posted on a solution we have that actually does allow prefill from external pages.  But at the same time, some of things in your initial post ("When a user signs in...") make me think you're expecting Mkto forms (regardless of where they're hosted) to be able to pick up cues that aren't really possible.  Like in a basic authenticated PHP app, for one example, a user might enter their email address and password in a login form.  That username and password would be sent to the server to be verified, and if they're verified the underlying user id would be stored in the PHP session store (on the server) and the session ID (which is a random alphanumeric string that is allows the session to be looked up) is sent to the browser in a cookie.  So from that point on, the browser only knows the session ID.  It doesn't even know the email address anymore.  Now, you can take steps to save the email address itself in a cookie during that first step, so maybe you could use it later to prefill a form.  But in a barebones setup, even though a user entered an email address to get into a site, the browser essentially forgets about it after that.*

* A complicating factor is the browser's own auto-fill mechanism used to remember usernames, passwords, and credit card info; you might be able to exploit this functionality to some degree, but it's not going to work in all browsers.