Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.59k stars 798 forks source link

[Bug] Two Forms On Same Page Reacting As Single Form #39788

Open cat-og opened 10 months ago

cat-og commented 10 months ago

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.

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 commented 10 months ago

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

github-actions[bot] commented 10 months ago

Support References

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

maciejpilarski commented 10 months ago

📌 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

chekle commented 7 months ago

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 commented 4 weeks ago

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

simison commented 3 weeks ago

Moved to Jetpack repo.