We copied the code from something you had provided in another thread on this topic: ( https://nation.marketo.com/blogs/marketowhisperer/2015/09/30/make-a-marketo-form-submission-in-the-background )… ‘Sanford Whiteman Apr 4, 2017 5:34 PM (in response to Graham Dubow) You have the event flow inverted from the way I would do it. Here’s a working adaptation of your code: MktoForms2 :: gdubrow/Marketo Form Submission We added the “if undefined” bit because we were getting errors where MktoForms2 were “undefined” and then added in our form fields. How would you use the code in that link you shared with more than just an email field? We'd also want to add the name, email, company etc.
... View more
Hi Sanford, Yes, you're right - we're trying to pass data to Marketo from a WordPress LP using a hidden Marketo form, so we can trigger campaigns based on form sign-ups. I've created a form with no fields, just the submit button - <script src="//app-ab34.marketo.com/js/forms2/js/forms2.min.js"></script> <form id="mktoForm_1038"></form> <script>MktoForms2.loadForm("//app-ab34.marketo.com", "091-OYP-062", 1038);</script> - and our WordPress admin embedded it in this test landing page here & created the code to submit the form (what I posted above). The smart campaign uses a 'Fills Out Form' trigger with a URL referrer constraint.
... View more