Skip to content

Conditional questions: short and long text as trigger - #3838

Open
AndyScherzinger wants to merge 1 commit into
feat/conditional-questions-5-scale-colorfrom
feat/conditional-questions-6-text
Open

AndyScherzinger wants to merge 1 commit into
feat/conditional-questions-5-scale-colorfrom
feat/conditional-questions-6-text

Conversation

@AndyScherzinger

@AndyScherzinger AndyScherzinger commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Part 6 of the conditional questions stack from #3123 (by Micke Nordin, with fixes by TimedIn and the review fixes). Based on #3837; 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
  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

This PR

A text trigger shows a branch when the answer equals (short text only) or contains a text, or matches a regular expression.

  • regular expressions use the same /pattern/modifiers format as validationRegex, on the server and in the browser;
  • they are checked when the extra settings are saved, and the editor does not save an invalid one but shows an error;
  • matching is limited in subject length and backtracking;
  • docs and tests.

With this PR, the stack has the full scope of #3123.

Tests

  • Unit tests: 619, 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 64.51613% with 11 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
lib/Service/SubmissionService.php 62.06% 11 Missing ⚠️

📢 Thoughts on this report? Let us know!

@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-5-scale-color branch from 624a98f to 5734f04 Compare November 4, 2026 14:07
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-6-text branch from b122f6a to 448bc3a Compare November 4, 2026 14:07
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-5-scale-color branch from 5734f04 to 6e7c64d Compare November 4, 2026 14:20
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-6-text branch from 448bc3a to 429d1d7 Compare November 4, 2026 14:20
A text trigger activates a branch when the answer equals (short text
only) or contains a text, or matches a regular expression. Regular
expressions use the same /pattern/modifiers format as validationRegex,
are checked when saving, and an invalid one is not saved by the
editor. Matching is limited in subject length and backtracking.

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>
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-5-scale-color branch from 6e7c64d to 7124f48 Compare November 4, 2026 16:51
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-6-text branch from 429d1d7 to ecbc30e 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