Marketo embedded form wont submit | Community
Skip to main content
Port_worx
New Participant
May 23, 2018
Solved

Marketo embedded form wont submit

  • May 23, 2018
  • 1 reply
  • 5838 views

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.
Best answer by SanfordWhiteman

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", ...

1 reply

SanfordWhiteman
New Participant
May 23, 2018

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

Steven_Vanderb3
New Participant
May 23, 2018

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?