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

unused/hidden read-only prefill fields trigger error #5124

Open
LaurensBurger opened this issue Feb 27, 2025 · 1 comment · May be fixed by #5135
Open

unused/hidden read-only prefill fields trigger error #5124

LaurensBurger opened this issue Feb 27, 2025 · 1 comment · May be fixed by #5135
Assignees
Labels
needs-backport Fix must be backported to stable release branch owner: den-bosch owner: den-haag
Milestone

Comments

@LaurensBurger
Copy link
Collaborator

LaurensBurger commented Feb 27, 2025

Product versie / Product version

3.x.x

Customer reference

DH, 's-Hertogenbosch

Omschrijf het probleem / Describe the bug

When a form has multiple field sets for a "uw-gegevens" step e.g:

  • DigiD
  • eHerkenning
  • Anon

And these field sets are hidden and the fields within (being dedicated for pre fill) are disabled: Trigger the "Je mag de prefill-gegevens niet wijzigen" error on "validate" call.

In this case the prefill did not return any value, and the field set is hidden because the user started the form with another authentication plugin.

As the fields that do not pass validation are not prefilled at all this should not occur.

Stappen om te reproduceren / Steps to reproduce

Form 749 on maykin test.
Start the form anonymous
Select: "Persoon"
Fill in fields and try to navigate to the next step.
See "validate" request.

Verwacht gedrag / Expected behavior

No response

Screen resolution

None

Device

None

OS

None

Browser

No response

@LaurensBurger LaurensBurger added triage Issue needs to be validated. Remove this label if the issue considered valid. owner: den-haag owner: den-bosch labels Feb 27, 2025
@joeribekker
Copy link
Contributor

Refinement: Needs fixing indeed.
Estimate: 4 days

@joeribekker joeribekker removed the triage Issue needs to be validated. Remove this label if the issue considered valid. label Mar 3, 2025
@vaszig vaszig moved this from Todo to In Progress in Development Mar 4, 2025
vaszig added a commit that referenced this issue Mar 4, 2025
@vaszig vaszig linked a pull request Mar 4, 2025 that will close this issue
10 tasks
vaszig added a commit that referenced this issue Mar 4, 2025
When  a component (or its parent is disabled and hidden, the validation in the backend is
triggered since there is no data for the specific key. This means, for our validator,
that the data has been changed and raises an error.
@vaszig vaszig moved this from In Progress to Done in Development Mar 4, 2025
@vaszig vaszig moved this from Done to Implemented in Development Mar 4, 2025
@sergei-maertens sergei-maertens added the needs-backport Fix must be backported to stable release branch label Mar 8, 2025
@joeribekker joeribekker added this to the Release 3.1.0 milestone Mar 10, 2025
vaszig added a commit that referenced this issue Mar 12, 2025
This ensures that if a field is prefilled but not hidden and the data is omitted from
the submission data, the initial prefill data is persisted in the database.
So, if a user clears a prefilled field that is read-only we make sure
that this will not affect the real value of the variable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-backport Fix must be backported to stable release branch owner: den-bosch owner: den-haag
Projects
Status: Implemented
Development

Successfully merging a pull request may close this issue.

4 participants