amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

amp-form: support enctype=application/x-www-form-urlencoded for action-xhr

Open pwdonald opened this issue 9 years ago • 14 comments

When using amp-form with method="POST" and action-xhr the resulting request is multipart/form-data binary. I tried setting enctype to application/x-www-form-urlencoded but it was ignored.

Is this by design? If so I do not see it documented.

pwdonald avatar Feb 16 '17 19:02 pwdonald

@pwdonald Currently not supported, but something we may support later. I will keep your issue open as a feature request and will update the documentation to reflect the lack of support.

aghassemi avatar Feb 16 '17 22:02 aghassemi

/cc @rudygalfi

aghassemi avatar Feb 16 '17 22:02 aghassemi

@aghassemi Is there anything special to know about supporting this, or does it just need prioritization guidance?

rudygalfi avatar May 01 '17 22:05 rudygalfi

@rudygalfi no, just needs prioritization. Ideally goes in the same bucket as https://github.com/ampproject/amphtml/issues/7695

aghassemi avatar May 01 '17 22:05 aghassemi

Any news on that?

g-guth avatar May 26 '18 19:05 g-guth

Bumping this, get this request a lot. Seems like something that should be supported, especially since the amp-form documentation states that "All other form attributes are optional.", without explaining that some just don't work. That's probably caused a lot of frustration.

philkrie avatar May 10 '19 17:05 philkrie

cc @nainar Can you take a fresh look at prioritization?

rudygalfi avatar May 10 '19 17:05 rudygalfi

Hi, just ran into this today. Any updates on prioritization? Thanks!

mcmd avatar Oct 03 '19 16:10 mcmd

+1, at the very least the documentation should be updated ASAP to specify that 1. not all form attributes are supported, and 2. enctype specifically is not configurable. This will save a lot of headache

philkrie avatar Oct 03 '19 23:10 philkrie

+1. For almost every project we do, we end up a modifying server endpoints that only accept application/x-www-form-urlencoded to accept multipart/form-data as well. Supporting application/x-www-form-urlencoded in amp-form would lower the level of effort to support AMP in many ecommerce environments.

jerimiahwelch avatar Mar 25 '20 20:03 jerimiahwelch

@krdwan will be working on getting a fix for this soon :)

caroqliu avatar Mar 27 '20 20:03 caroqliu

/invite @krdwan

alanorozco avatar Mar 27 '20 20:03 alanorozco

An invitation to join ampproject has been sent to @krdwan. I will update this thread when the invitation is accepted.

amp-invite-bot avatar Mar 27 '20 20:03 amp-invite-bot

The invitation to @krdwan was accepted!

amp-invite-bot avatar Mar 27 '20 20:03 amp-invite-bot