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

Select with multiple: true has wrong default value #4084

Closed
5 tasks done
sergei-maertens opened this issue Apr 2, 2024 · 1 comment · Fixed by open-formulieren/formio-builder#135, #4121 or open-formulieren/formio-builder#138
Assignees
Labels
bug Something isn't working topic: form builder
Milestone

Comments

@sergei-maertens
Copy link
Member

sergei-maertens commented Apr 2, 2024

Currently the form builder produces a default value of [""] (i.e. a list with one element - the empty string), which should just be an empty list entirely ([]) instead.

This causes validation issues, because the empty string is typically not a valid choice.

Tasks

  • Patch form builder
  • Add data migration (+ form import fixer) to convert defaultValue: [""] into defaultValue: []
  • Check/patch similar components:
    • Radio
    • Selectboxes
@sergei-maertens sergei-maertens added bug Something isn't working topic: form builder labels Apr 2, 2024
@sergei-maertens sergei-maertens added this to the Release 2.6.2 milestone Apr 2, 2024
@sergei-maertens sergei-maertens self-assigned this Apr 2, 2024
@sergei-maertens sergei-maertens added needs-backport Fix must be backported to stable release branch and removed needs-backport Fix must be backported to stable release branch labels Apr 2, 2024
@sergei-maertens
Copy link
Member Author

Removing backport label - JSON can be edited as a workaround and we're explicitly setting up our backend validation to allow it for now.

@joeribekker joeribekker assigned Viicos and unassigned sergei-maertens Apr 4, 2024
Viicos added a commit to open-formulieren/formio-builder that referenced this issue Apr 4, 2024
Viicos added a commit to open-formulieren/formio-builder that referenced this issue Apr 5, 2024
sergei-maertens added a commit to open-formulieren/formio-builder that referenced this issue Apr 5, 2024
Viicos added a commit to open-formulieren/formio-builder that referenced this issue Apr 10, 2024
Viicos added a commit to open-formulieren/formio-builder that referenced this issue Apr 10, 2024
Viicos added a commit to open-formulieren/formio-builder that referenced this issue Apr 11, 2024
Co-authored-by: Sergei Maertens <sergei-maertens@users.noreply.github.com>
sergei-maertens added a commit to open-formulieren/formio-builder that referenced this issue Apr 11, 2024
sergei-maertens added a commit that referenced this issue Apr 16, 2024
Contains bugfixes for a number of tickets:

* #4084
* #4155
* #3964
sergei-maertens added a commit that referenced this issue Apr 16, 2024
Contains bugfixes for a number of tickets:

* #4084
* #4155
* #3964

Backport-of: #4176
Viicos added a commit that referenced this issue Apr 19, 2024
[#4084] Add migration to fix multiple select default value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment