I wonder why my form with lightbox style did not show on my landing page? | Community
Skip to main content
March 30, 2016
Solved

I wonder why my form with lightbox style did not show on my landing page?

  • March 30, 2016
  • 1 reply
  • 1101 views

Can someone sort this out for me? It's a lightbox style Mkto Form which needed to be showing on my landing page. But somehow after I embedded piece of code as what Marketo instructed on the Developers page, it is still not working:

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

<form id="mktoForm_1814"></form>

<script>MktoForms2.loadForm("//app-ab03.marketo.com", "463-EQS-987", 1814, function (form)

    if (location.href.indexOf("lightboxForm=true") != -1) {

           MktoForms2.lightbox(form).show();

});</script>

Is there anything wrong with the code? Is there something else I need to add onto this piece? Appreciate it if someone could help!

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

Your code has a syntax error.  Always look in your browser's console first.

<script>

  MktoForms2.loadForm("//app-ab03.marketo.com", "463-EQS-987", 1814, function (form){

      if (location.href.indexOf("lightboxForm=true") != -1) {

        MktoForms2.lightbox(form).show();

      }

  });

</script>

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
March 31, 2016

Your code has a syntax error.  Always look in your browser's console first.

<script>

  MktoForms2.loadForm("//app-ab03.marketo.com", "463-EQS-987", 1814, function (form){

      if (location.href.indexOf("lightboxForm=true") != -1) {

        MktoForms2.lightbox(form).show();

      }

  });

</script>

April 4, 2016

Thank you Sanford! Appreciate it.