Embed two marketo form into one page | Community
Skip to main content
June 18, 2015
Question

Embed two marketo form into one page

  • June 18, 2015
  • 3 replies
  • 4739 views

Hi,

I embed two marketo form into a non-marketo page:

- Form 1:

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

<form id="mktoForm_1111"></form>

<script>MktoForms2.loadForm("//app-sjo.marketo.com", "XXX-PCT-XXX", 1111);</script>

- Form 2:

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

<form id="mktoForm_2222"></form>

<script>MktoForms2.loadForm("//app-sjo.marketo.com", "XXX-PCT-XXX", 2222);</script>

So, do i need to add <script src="//app-sjo.marketo.com/js/forms2/js/forms2.min.js"></script> twice on this page?

Thanks,

Lam

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

3 replies

June 18, 2015

And it seems the form validation conflict with fields in 2 forms.

Ex: when i focus in the email field in form2, it jum to email in form 1 with the error tooltip?

SanfordWhiteman
Level 10
June 18, 2015

You absolutely do not want to add forms2.min.js twice.

Level 10
June 19, 2015

Adding 2 Marketo forms on a single landing page is not possible since it would cause a conflict of IDs. One option is to have a form on a landing page, and on click of the Submit button, we show another form as a pop-up in a lightbox. Two separate forms on a single MKTO or non-MKTO landing page are not possible.     

SanfordWhiteman
Level 10
June 19, 2015

Alok, this is not true.  It's quite possible, there's no conflict. MktoForms2 :: Two forms, One page

Perhaps you are confusing this with having the same form twice on one page.

Level 10
June 19, 2015

@Sanford Whiteman This is helpful. Yes, I was assuming two same forms on a single landing page. Thanks for clarifying.