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

Created on 16 Feb 2017  路  14Comments  路  Source: ampproject/amphtml

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

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

amp-form Developer Soon DevX Feature Request components

Most helpful comment

+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

All 14 comments

@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.

/cc @rudygalfi

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

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

Any news on that?

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.

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

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

+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

+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.

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

/invite @krdwan

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

The invitation to @krdwan was accepted!

Was this page helpful?
0 / 5 - 0 ratings