ampproject / ampproject/amphtml

With amp-form, verify-xhr is not sending requests when using encType application/x-www-form-urlencoded

Open
#33,637 2 comments 0 reactions 0 assignees View on GitHub
Stale
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

## 🐛 Bug Report

### Current behavior
I am trying to validate my form using verify-xhr, but I noticed that no requests are sent to the server when I use `encType="application/x-www-form-urlencoded"`, when I send data as multipart I can see the requests coming to the server.

But I would like to still be able to use `x-www-form-urlencoded` for my form.

Relevant code :

This form will not send any verification request :
```


submit

```

But when I remove this line `encType="application/x-www-form-urlencoded"` the requests are correctly sent.

### Expected behavior/code
I would expect to be able to verify forms with all encoding.

- What browser are you using?
Google Chrome 85
- What O/S are you using?
Linux Fedora

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the form configuration with amp-form, verify-xhr, and encType="application/x-www-form-urlencoded" in Chrome, then compare it with the multipart and omitted-encType cases. Trace the amp-form verification request handling and confirm that verification requests are sent for the URL-encoded form while existing cases remain working.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.