AnsweredAssumed Answered

Multiple "Form in Background" Submissions from a Page?

Question asked by 3a8d5c50464fe0a3b6f36e0976a60df178692f26 on Dec 15, 2016
Latest reply on Dec 19, 2016 by sanford.whiteman

Fighting through the limitations of the Marketo form builder, I was thrilled to find this:

 

http://developers.marketo.com/blog/make-a-marketo-form-submission-in-the-background/

 

Simple, elegant, and it works without doing up another half a website of inconsistent CSS to cover every single form.  

 

SOAP and REST APIs work too, but require lots more code too.  The Munchkin API works too, but has virtually no documented features - associateLead adds someone to the system + nothing useful at all.

 

Then I realized I want multiple forms on a page.  That doesn't work because it assumes the wrong form.

 

As I look at this line, I realize there has to be a way to reference specific forms, instead of just the generic catch-all:

 

var myForm = MktoForms2.allForms()[0];

 

How would somebody reference individual forms using this method? 

Outcomes