Form 2.0 prefill when embedding

Form 2.0 prefill when embedding

When embedding a form 2.0 on a web page, form prefill currently does not work. Let's make oit work 🙂
37 Comments
SanfordWhiteman
Level 10 - Community Moderator

Put your tokens inside the object window.mktoPreFillFields (don't use vals/setValues). The order doesn't matter.

Not coincidentally, this is the key to making prefill work with embedded forms.

SanfordWhiteman
Level 10 - Community Moderator

The only way security is preserved is if the calls to the web service are secured by the Origin: header.

Ashley_Tate
Level 2

I have no idea what that means (I'm not a developer) but this was the code I used when I worked in Eloqua: Pre-populate Single Pick Lists with DLPrepop | Oracle Community The main issue was Eloqua doesn't pre-populate drop downs on their own forms sitting their own landing pages (you have to use a jquery loop to compare Eloqua's equivalent of tokens to the select options), so the purpose of that thread was to figure out how to add drop down pre-population into the WDL code. That being said, that thread lays out the working WDL nicely and 99% of it was provided by Eloqua; all you had to do was plug in your instance information.

Ashley_Tate
Level 2

We're not doing anything on our form that would require conditional visibility (yet), but I'll keep that in mind when we do.

SanfordWhiteman
Level 10 - Community Moderator

Well, I was just quoting you about the security. I doubt the Eloqua solution actually does respect security in the manner required. You see, the principal reason that embedded forms cannot securely include lead data is that there's no restriction on where (as in which hostnames) they can be embedded. Adding origin-based security, where the data source to some degree has to "opt in" to serving the data to the page, is the only way to meet this need.

Someday soon I will blog about how you can make this work (there is, by the way, a solution that I've shown to a few people).

SanfordWhiteman
Level 10 - Community Moderator

but it is possible without compromising the security of the data being passed.

I just tested the Eloqua "solution" and it is by no means secure.  And I'm not even talking about the fact that the demo doesn't use SSL.  There is zero security on which pages can use the data service.  This is exactly why embedded forms do not simply fetch lead PII into the page without any other verification.

Anonymous
Not applicable

How do you do this with iframes, while respecting responsive design?

Robb_Barrett
Marketo Employee

Put it in a DIV that handles responsive design.

Alisa_Baum
Level 1

HubSpot allows this functionality. Please add it. We were thrilled to embed forms on our web pages for SEO purposes.

Last year, the product team said it was on the plan for this year. Any ETA for the launch of this functionality? Thank you

Dustin_Russell4
Level 2

+1 (several times over) for pre-fill on embedded forms