Getting Error “Form submission canceled because the form is not connected”

Quick answer : append the form to the body.

document.body.appendChild(form);

Or, if you’re using jQuery as above: $(document.body).append(form);

Details : According to the HTML standards, if the form is not associated to the browsing context(document), the form submission will be aborted.

HTML SPEC see 4.10.21.3.2

In Chrome 56, this spec was applied.

Chrome code diff see @@ -347,9 +347,16 @@

P.S about your question #1. In my opinion, unlike ajax, form submission causes instant page move.
So, showing ‘deprecated warning message’ is almost impossible.
I also think it’s unacceptable that this serious change is not included in the feature change list. Chrome 56 features – www.chromestatus.com/features#milestone%3D56

Leave a Comment