Marketo embedded form wont submit | Community
Skip to main content
Port_worx
Level 2
May 23, 2018 4:58 PM UTC
Solved

Marketo embedded form wont submit

Hi all,

Our marketo embedded form is throwing a

CORS error and will not submit

Thanks,

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
May 24, 2018 6:20 AM UTC

Hi Sanford,

and this is the error on inspector


OK, figured it out.

The problem is you have a race condition between your 2 forms, which are loading from different domains. When the cross-domain IFRAME shim (which is designed to avoid the need for CORS) loads from one domain and tries to post to the other domain, you then need a CORS request, which in turn fails because the server is not set up to respond to OPTIONS requests (it should never receive a CORS request).

This set of conditions will occur randomly, based on network connection speed + quality and cache conditions, since the form descriptors load asynchronously.

Load both forms from the same domain and the problem will go away:

MktoForms2.loadForm("//go.portworx.com", ...

6 replies

SanfordWhiteman
Level 10
May 23, 2018 5:13 PM UTC

No possible way to troubleshoot ​anything​ like this without a URL.

Translate
Steven_Vanderb3
Level 9
May 23, 2018 9:53 PM UTC

There appears to be two forms on this page looking at the source code: id 1181 and id 1061.  Do they exist and are approved in your instance?

Translate