My MktoForm is loaded more than once each time. | Community
Skip to main content
September 10, 2015
Question

My MktoForm is loaded more than once each time.

  • September 10, 2015
  • 1 reply
  • 1464 views

How can my Marketo form be loaded only once?

it displays three of the forms.

the form's php file called from certain WP pages with shortcode.

<div id="form_mkt">

    <script src="//app-ab00.marketo.com/js/forms0/js/forms0.min.js"></script>

    <form id="mktoForm_0000"></form>

    <script>

    var myReferrer;

  myReferrer = document.title;

  MktoForms0.loadForm("//app-ab00.marketo.com", "000-MDO-000", 0000 ,function(form) {

     form.vals({"LPPageTitle" : myReferrer});}

);  </script>

</div>

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

1 reply

SanfordWhiteman
Level 10
September 10, 2015

Please post the URL to your page.  Typically the problem arises from duplicate DIVs.

September 10, 2015

Thank you to reply.

就業までの流れ2 | 建築、土木の求人に強い施工管理求人ナビ

Please click the yellow button show up first...

The php file "Form_agreement.php" is called from inside of this accordion dl.

There is a shortcode [myphp file='Form_agreement'].

SanfordWhiteman
Level 10
September 10, 2015

If you look at the source of the page, you can see the Marketo <FORM> element and accompanying <SCRIPT> tag are inserted 3 times.  This is something WordPress is doing.  I don't recommend using libraries for Marketo embeds because they aren't always kept up to date.  In any case, if you look around WP you'll surely find the duplicate (triplicate).  It isn't anything Marketo is doing, it's just following orders.