open-formulieren / open-forms

Smart and dynamic forms
https://open-forms.readthedocs.io
Other
34 stars 25 forks source link

it's possible to navigate to the next step under certain conditions, causing validation errors on submit. #4510

Open LaurensBurger opened 1 month ago

LaurensBurger commented 1 month ago

Product versie / Product version

2.6.x - 2.7.x

Customer reference

No response

Omschrijf het probleem / Describe the bug

In certain forms that take a fair amount of time to load/check_logic it is possible for a brief moment to navigate to the next step, before required fields are visible. This causes a "call did not validate on the backend" error when submitting. image

The issue is reproducible while the check_logic has not yet returned a response, the user is allowed to navigate to the next step. This means if the check_logic returned fields that are required, the user has essentially skipped them.

The scenario where it's easiest to replicate this is a large form, and a selectboxes component with many answers. each answer should make a field set visible with required fields through back-end logic.

When the user selects a answer and clicks "Next" right away - the form will navigate to the next step, but the field set will be taken into consideration when submitting.

Although it's somewhat reproducable - it seems dependant on both the form but also network conditions. So perhaps a solution for this could be a clear indication on what answers still need to be completed - instead of a generic error. image

Stappen om te reproduceren / Steps to reproduce

No response

Verwacht gedrag / Expected behavior

No response

Screen resolution

None

Device

None

OS

None

Browser

No response

sergei-maertens commented 1 month ago
joeribekker commented 1 month ago

Refinement: There is a race condition and it scares sErgei. But, we're waiting for a stakeholder.

LaurensBurger commented 1 month ago

Occurs quite often for Utrecht, resulting in failed submissions every day.