ampproject / ampproject/amphtml

Amp-form requires child input tag for post requests

Open
#38,706 1 comment 1 reaction 0 assignees View on GitHub
Component: amp-form P2: Soon Stale Type: Feature Request WG: amp4email
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

### Description

We wanted our AMP email components to make post requests upon click of a ` tag. It took us significant time to figure out that we needed an `` child within the `` to have the post request work. We tested that it would work if we changed our server endpoints to a handle a get request and we did not need the `` child tag.

This should be clearly stated in the amp email documentation, so that it's clear for POST requests that we need an input tag. If this exists somewhere, could we point to that documentation since it's not very clear in the current [amp form documentation](https://amp.dev/documentation/components/email/amp-form).

### Alternatives Considered

In the past, due to not being able to figure out the issue, we made our `` make GET requests and just changed our server endpoints to handle GET requests, but definitely not ideal when the request we're making is more of a POST request.

### Additional Context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the amp-form documentation at https://amp.dev/documentation/components/email/amp-form and review how POST requests are described. Document that POST requests require an input child within the form, and clarify the distinction from GET requests so readers can verify the requirement.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.