umbraco / Umbraco.Forms.Issues

Public issue tracker for Umbraco Forms
29 stars 0 forks source link

Change in umbracoforms.min.js makes same form two times on same page makes validation fail #1297

Open runegronkjaer opened 3 days ago

runegronkjaer commented 3 days ago

A change have been made to the /Assets/themes/default/umbracoforms.min.js file that is a problem when the same form is on the page two or more times. The problem is that the validation triggers on both forms instead of only the one that the user is interacting with.

Bug summary

Seems like a recent change in the umbracoforms.min.js have broken validation.

Specifics

This is the file that is broken https://www.athenas.nl/App_Plugins/UmbracoForms/Assets/themes/default/umbracoforms.min.js

Here's a live example: https://www.athenas.nl/testingformspage/

Here's a screenshot of the change that has made the problem. umbracoforma-javascript-difference

Steps to reproduce

  1. Create two of the same form on the same page
  2. The last form will submit but the first one will not, because it validates the second form as well

Expected result

The validation should be sandboxed to only the form that is being interacted with

Actual result

Both forms validate when one is interacted with.


This item has been added to our backlog AB#44160

AndyButland commented 3 days ago

Thanks for reporting this. It looks like our fix for https://github.com/umbraco/Forms/pull/1053 has caused this regression. We'll investigate a means of supporting two forms on the page as well as resolving the linked issue.

LSkovlund commented 2 days ago

@AndyButland the form does not even have to be the same. I have updated the example - https://www.athenas.nl/testingformspage/ - if you try submitting Test Form 1, you will see that it validates and submits a completely different form.

Another curious thing is that athenas.nl and a-speakers.fr are a part of the same cloud solution, and therefore both running "Forms 13.2.2" hower a-speakers.fr is at the moment of writing still loading the old script, and things are working as expected, but athenas.nl is loading the new script, and many things regarding their forms are broken.

image

image