Skip to content

Fix form submission error when a multiple dropdown field question is empty - #1323

Open
Lainow wants to merge 1 commit into
11.0/bugfixesfrom
fix-empty-multiple-dropdown-answer
Open

Lainow wants to merge 1 commit into
11.0/bugfixesfrom
fix-empty-multiple-dropdown-answer

Conversation

@Lainow

@Lainow Lainow commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Checklist before requesting a review

Please delete options that are not relevant.

  • I have performed a self-review of my code.
  • I have added tests (when available) that prove my fix is effective or that my feature works.
  • I have updated the CHANGELOG with a short functional description of the fix or new feature.
  • This change requires a documentation update.

Description

  • It fixes !47292
  • Here is a brief description of what this PR does

Submitting a form with an empty multiple dropdown field question failed with a TypeError. An empty selection sends items_id = '', and formatRawAnswer() passed that value to getById() without casting it to an integer. The ids are now cast to integers and empty values are filtered out.

Screenshots (if appropriate):

@Lainow Lainow self-assigned this Oct 29, 2026
@Lainow
Lainow requested review from a team, Herafia, Mary-Clb and RomainLvr and removed request for a team October 30, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant