Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forms: two forms on same page reacting as single form #39788

Open
cat-og opened this issue Jan 12, 2024 · 6 comments
Open

Forms: two forms on same page reacting as single form #39788

cat-og opened this issue Jan 12, 2024 · 6 comments
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

Comments

@cat-og
Copy link

cat-og commented Jan 12, 2024

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.
    YC6abK.png

  • 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
    cnSrsf.png

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.
B0Eetg.png

Steps to reproduce

  1. Create a new post or page
  2. Add two form blocks with at least one required reply per form, and publish the post
  3. Test submitting a form response to the first form

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

@cat-og cat-og added [Type] Bug When a feature is broken and / or not performing as intended Needs triage Ticket needs to be triaged [Feature Group] Editor Experience Features related to Gutenberg integration on WordPress.com. labels Jan 12, 2024
@cat-og
Copy link
Author

cat-og commented Jan 12, 2024

Created a follow-up with user here: 7572279-zd-a8c

Copy link
Contributor

github-actions bot commented Jan 12, 2024

Support References

This comment is automatically generated. Please do not edit it.

  • 7572279-zen
  • 7989637-zen

@github-actions github-actions bot added [Pri] Normal Customer Report Issues or PRs that were reported via Happiness. aka "Happiness Request", or "User Report" labels Jan 12, 2024
@maciejpilarski
Copy link

📌 REPRODUCTION RESULTS

– Tested on Atomic – Replicated

📌 FINDINGS/SCREENSHOTS/VIDEO
I was able to reproduce the issue on my side:
Markup on 2024-01-15 at 20:47:29
Markup on 2024-01-15 at 20:47:13

📌 ACTIONS

  • Triaged

@maciejpilarski maciejpilarski added Triaged and removed Needs triage Ticket needs to be triaged labels Jan 15, 2024
@chekle
Copy link

chekle commented Apr 4, 2024

I just wanted to mention that I had a user with the same issue, deleting one of the forms and adding it again solved the problem in that case. 7989637-zd-a8c

@inaikem inaikem closed this as completed Oct 13, 2024
@inaikem inaikem reopened this Oct 13, 2024
@inaikem
Copy link

inaikem commented Oct 15, 2024

Allocated to the Jetpack Team on The One Board for review.

@simison simison transferred this issue from Automattic/wp-calypso Oct 16, 2024
@simison
Copy link
Member

simison commented Oct 16, 2024

Moved to Jetpack repo.

@simison simison added [Feature] Contact Form [Block] Contact Form Form block (also see Contact Form label) labels Oct 16, 2024
@simison simison changed the title [Bug] Two Forms On Same Page Reacting As Single Form Forms:: two forms on same page reacting as single form Jan 2, 2025
@simison simison changed the title Forms:: two forms on same page reacting as single form Forms: two forms on same page reacting as single form Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
Development

No branches or pull requests

5 participants