umbraco / Umbraco.Forms.Issues

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

Umbraco Forms 13.1.0: Two (or more) forms on one page triggers validation on last form. #1189

Closed AlexanderWagner82 closed 3 months ago

AlexanderWagner82 commented 3 months ago

This is tested on Umbraco 13.2.2 and Umbraco.Forms 13.1.0

If you have two (or more) forms on a page and try to submit the first form, then the validation triggers for the second form instead of the first form.

I've noticed that it's always the last form on the page where the validation gets triggered.

Reverting back to Umbraco.Forms 13.0.2 solved the problem, so it works as expected on that version.

Reproduction

Add two different forms to a page that has mandatory input fields in them. Submit the first form. The second form is validated instead.

Expected result

The first form should be validated since it was the form that got submitted.

AndyButland commented 3 months ago

Thanks @AlexanderWagner82 - I can replicate the problem and see where it crept in. We'll fix it in the next patch release, which we'll get out shortly.

If you were up for testing it on your environment, just to be sure it does resolve the issue for you, please let me know, and I can make it available for you.

AlexanderWagner82 commented 3 months ago

Hi @AndyButland

Sure thing, I can test it :).

AndyButland commented 3 months ago

Thanks - in that case you should be able to install Umbraco.Forms -Version 13.1.1 from our prerelease feed at https://www.myget.org/F/umbracoprereleases/api/v3/index.json. Looks good in my testing but of course would be great if you can check it to confirm the fix before I push it out. Thanks.

AlexanderWagner82 commented 3 months ago

Works like a charm so feel free to release it officially.

Thank you for your swift reply and quick bugfix

AndyButland commented 3 months ago

Great, thanks for checking it for us. Much appreciated.

AndyButland commented 3 months ago

Available now publicly in 13.1.1.