Lightbox Form not pre-populating | Community
Skip to main content
Community Advisor
September 17, 2014
Question

Lightbox Form not pre-populating

  • September 17, 2014
  • 1 reply
  • 714 views
I'm not sure why my form that I put in a lightbox is not pre-populating with information after coming from an email link.  I used the JS query to pop up the lightbox w/ form on click, maybe that prevents something?  My LP is set to enable pre-populating.  am I missing sometthing?

Here's the generic script I'm using:

 

<a href="#" id="lightbox-link">CONTACT US</a>

 

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

<form id="mktoForm_618">&nbsp;</form>

<script>

  var btn = document.getElementById("lightbox-link");

  btn.onclick = function(){

    MktoForms2.loadForm("//app-xxx.marketo.com", "xxx-xxx-xxx",618, function (form){

      MktoForms2.lightbox(form).show();

    });

  };

</script>

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Grant_Booth
Level 9
September 18, 2014
Hi JD,

For security reasons, forms will only prepopulate if they're dragged onto a Marketo landing page using the form editor. Forms can't prefill when using the embed code.
If you use one of our API's in conjunction with the .vals method from here:
http://developers.marketo.com/documentation/websites/forms-2-0/
you might be able to set up something custom.