Skip to content

amp-form: pass through non-XHR POST requests #27638

@adekbadek

Description

@adekbadek

amp-form throws an error if a form without action-xhr attribute is submitted:

handleNonXhrPost_() {
// non-XHR POST requests are not supported.
userAssert(
false,
'Only XHR based (via action-xhr attribute) submissions are supported ' +
'for POST requests. %s',
this.form_
);
}

There might be a situation where a regular (non-XHR) form is rendered on an AMP page – this form will be unsubmittable.

Would it be possible to allow default form submission for non-XHR forms?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions