Forms: two forms on same page reacting as single form #39788
Labels
[Block] Contact Form
Form block (also see Contact Form label)
Customer Report
Issues or PRs that were reported via Happiness. aka "Happiness Request", or "User Report"
[Feature] Contact Form
[Feature Group] Editor Experience
Features related to Gutenberg integration on WordPress.com.
[Platform] Atomic
[Platform] Simple
[Pri] Normal
Triaged
[Type] Bug
When a feature is broken and / or not performing as intended
Quick summary
When there are two form blocks on the same post or page will react as though they are part of the same form.
If they have the same required field names, the form will submit twice, with a confirmation message on both forms.
If they have different field input names, the required fields on the second form will throw an error requiring that you fill that in, even if you were working on the first form
To get around this, the user created a single form on their individual posts, with a button that links back to a new page with the second form.
I could not replicate this each time in testing, even if I set up two pages the same way. I set up the same two forms with the same three fields on two different pages; the first page returned this error, and the second page works perfectly.
Steps to reproduce
What you expected to happen
The first form submits my response, without any effect on the page's second form.
What actually happened
If the form required field names are the same, a single response will be submitted for both forms.
If the form required field names are different, or if the second form has a required field not included in the first form, the page will return an error requiring you to fill out the required fields on the second form. Neither form is submitted.
Impact
Most (> 50%)
Available workarounds?
Yes, easy to implement
Platform (Simple and/or Atomic)
Simple, Atomic
Logs or notes
No response
The text was updated successfully, but these errors were encountered: