SOLVED

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

Go to solution
Anonymous
Not applicable

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

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!

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

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

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>

View solution in original post

2 REPLIES 2
SanfordWhiteman
Level 10 - Community Moderator

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

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>

Anonymous
Not applicable

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

Thank you Sanford! Appreciate it.