6 Replies Latest reply on Nov 16, 2017 2:06 PM by Sanford Whiteman

    Two Forms, One Page?

    Marcie Fontecchio

      Is it possible to have two functioning Marketo forms on the same webpage (non-Marketo landing page)? Either two of the same form or one Form A and one Form B - are either/both possible? We have tried in the past and run into processing and styling issues, but we are launching a new site and are hoping to revisit this issue.

       

      Is anyone doing this right now? Is it working?

       

      The use case is that we have a form in our footer, but we'd like the occasional product-specific form or just the same general form to show up elsewhere on the page.

        • Re: Two Forms, One Page?
          Sanford Whiteman

          Yes, it's possible.  You have to inject the forms, let us say, mindfully into the page. A running demo is here:

           

          MktoForms2 :: Multiple Forms, Multiple Times

           

          You can see that the page is running 3 Marketo forms: 2 instances of form #341 (which is harder to do than multiple form IDs!) and and 1 instance of form #335.  Each form functions separately without polluting the others (most people think they have this working but they don't realize that the forms are interfering with each other).

           

          The only part of the JS code (in the JS pane) you'd change is the mktoFormConfig block.

           

          But very close attention to the way the HTML <form> elements are formed  (in the HTML pane): they have the class mktoForm but no id attribute, and they have the extra attributes data-formId and data-formInstance.  The data-formInstance is optional (it's just a cosmetic identifier to distinguish between copies of the same form) but the data-formId is required and contains (naturally) the form ID that goes in it.

          2 of 2 people found this helpful
          • Re: Two Forms, One Page?
            Sanford Whiteman

            Marcie can you mark my answer as correct, unless you think I've missed something?