I embed two marketo form into a non-marketo page:
- Form 1:
<script>MktoForms2.loadForm("//app-sjo.marketo.com", "XXX-PCT-XXX", 1111);</script>
- Form 2:
<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?
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?
You absolutely do not want to add forms2.min.js twice.
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.
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.
Sanford Whiteman This is helpful. Yes, I was assuming two same forms on a single landing page. Thanks for clarifying.
I'm doing the same thing and am running into form validation issues. When a user submits one form, after submission the page scrolls to the other form with a different id and has all the fields highlighted. The original form does submit properly, but the user wouldn't know that based on this behavior (I have both forms set to keep the user on the page). Each of the forms are rendering with 2 submit buttons as well. There's no errors popping up in the console and i'm kind of at a loss. How were you able to avoid these bugs in your jsFiddle?
There aren't any tricks in the Fiddle (you can see all the JS). What's your page URL?
Is there a place i could email it to you directly, it's a staging url....