Skip to content

Conditional questions: checkboxes as trigger - #3834

Open
AndyScherzinger wants to merge 2 commits into
feat/conditional-questions-1-basefrom
feat/conditional-questions-2-checkboxes
Open

AndyScherzinger wants to merge 2 commits into
feat/conditional-questions-1-basefrom
feat/conditional-questions-2-checkboxes

Conversation

@AndyScherzinger

@AndyScherzinger AndyScherzinger commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Part 2 of the conditional questions stack from #3123 (by Micke Nordin, with fixes by TimedIn and the review fixes). Based on #3833; the "Files changed" tab shows only this part.

Stack

  1. Conditional questions: base implementation plus support for radio and dropdown triggers #3833 Conditional questions: radio and dropdown triggers
  2. Conditional questions: checkboxes as trigger #3834 Conditional questions: checkboxes as trigger ← this PR
  3. Conditional questions: date and time as trigger #3835 Conditional questions: date and time as trigger
  4. Conditional questions: file upload as trigger #3836 Conditional questions: file upload as trigger
  5. Conditional questions: linear scale and color as trigger #3837 Conditional questions: linear scale and color as trigger
  6. Conditional questions: short and long text as trigger #3838 Conditional questions: short and long text as trigger

This PR

A checkbox trigger shows a branch when all options of one of its option combinations are selected. Several branches can be shown at once.

  • condition matching on the server and in the browser (any of the branch's combinations, all options of a combination);
  • the combination picker in the condition editor;
  • copies of a question map the option ids of the combinations to the copied options;
  • the extra settings only accept integer option ids;
  • docs and tests.

It also fixes the branch label for checkbox triggers: it read optionId only, so every checkbox branch was called "Branch 1", "Branch 2", also in the names of its group and buttons. It now lists the options, e.g. "Nuts + Gluten".

Tests

  • Unit tests: 608, all passing except the 15 IUserFolder errors main has as well.
  • php-cs-fixer, eslint and the build are clean.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@codecov

codecov Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 69.23077% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
lib/Service/SubmissionService.php 62.50% 3 Missing ⚠️
lib/Service/FormsService.php 80.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-2-checkboxes branch from 97bcf09 to 924a809 Compare November 4, 2026 14:07
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-1-base branch from b833f24 to 9d9b414 Compare November 4, 2026 14:07
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-2-checkboxes branch from 924a809 to d06f7a4 Compare November 4, 2026 14:20
A checkbox trigger activates a branch when all options of one of its
option combinations are selected, so several branches can be shown at
once. The condition editor picks the combination, copies of a
question map the option ids of the combinations to the copied
options, and the extra settings only accept integer option ids.

The code comes from the original pull request #3123 by Micke Nordin
and TimedIn, with the review fixes applied.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Checkbox conditions store a combination in optionIds, but the branch
label only read optionId, so every checkbox branch was called
"Branch 1", "Branch 2" and so on, also in the names of its group and
buttons. The label now lists the options of the combination.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-2-checkboxes branch from d06f7a4 to fc6e821 Compare November 4, 2026 16:51
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-1-base branch from 20f7fab to 21f29c0 Compare November 4, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant