AnsweredAssumed Answered

Auto Fill Embedded Forms (not on Marketo landing page)

Question asked by Eric Salamon on Jun 1, 2017
Latest reply on Dec 11, 2018 by Sanford Whiteman

This is a fun one. I have tried to use auto fill forms in the past and it worked, but that was because I was not embedding the form on the web site.



Right now I am working with a WordPress site, and have discovered that my predecessor really mucked it up. There were 3 outdated Marketo Plug-ins, the wrong Munchkin code and lots of additional things that brought the site performance down. On top of that all the forms were Iframed. The site also has lots of mixed content HTTP, and HTTPS, right now we are working to move to HTTPS which has issues with the Iframes, because the Marketo instance is not secured with the SSL certificate. (There is an additional cost to adding the certificate in Marketo and there is a small amount of down time.)


Embedding the forms is the solution I came up with, but they don't auto fill. This isn't a deal breaker, but I would like to make things easier for people when they fill out forms.



I have been putting together some information based on the scripts and other sources I noticed:

Auto populate form from Marketo cookie and auto submitting the form


The concept looks secure, but the instructions for implementing them are not. Writing the JS I could probably figure out, but how would one connect the REST API to the website to pull the field data?


<script src="//"></script>

<form id="formID"></form>


  MktoForms2.loadForm("Link", "Marketo Stuff", Form#,function(form) {

  var prefillFields = {

  "Email" :,

  "FirstName" : mktoLeadFields.firstName,

  "LastName" : mktoLeadFields.lastName,

  "Company" :






This is where I got in the coding setup any additional advise would be great.


Message was edited by: Eric Salaman