Skip to content

Conditional questions: go to a question based on the value of a linear scale - #3837

Draft
AndyScherzinger wants to merge 1 commit into
feat/conditional-questions-3-date-timefrom
feat/conditional-questions-5-scale-color
Draft

AndyScherzinger wants to merge 1 commit into
feat/conditional-questions-3-date-timefrom
feat/conditional-questions-5-scale-color

Conversation

@AndyScherzinger

@AndyScherzinger AndyScherzinger commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Part 4 of the conditional questions stack, based on #3123 by Micke Nordin with the fixes by TimedIn. Based on #3835; the "Files changed" tab shows only this part.

Stack

  1. Conditional questions: go to a question based on the answer #3833 Conditional questions: go to a question based on the answer
  2. Conditional questions: go to a question after checkbox questions #3834 Conditional questions: go to a question after checkbox questions
  3. Conditional questions: go to a question after date and time questions #3835 Conditional questions: go to a question after date and time questions
  4. Conditional questions: go to a question based on the value of a linear scale #3837 Conditional questions: go to a question based on the value of a linear scale ← this PR

This PR

  • Each value of a linear scale gets a target (goTo with {value, target}), like Microsoft's Rating.
  • Linear scales take only goTo, as radio and dropdown questions; a value without a jump goes to the next question.
  • Values are 0 to 10, the range of every scale. Narrowing a scale removes the jumps of the values that are gone and reports them in X-Forms-Adjusted.
  • Co-authored by TimedIn, based on the linear scale support in Conditional Logic #3123.

Tests

  • PHPUnit passes, except the 3 IUserFolder errors main also has on the test instance.
  • psalm, php-cs-fixer and eslint are clean; vue-tsc shows no new errors; the build works.
  • Tested on a running instance with TimedIn's sign-up case from Conditional Logic #3123; axe reports no violations.

🤖 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

✅ All modified and coverable lines are covered by tests.

📢 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-4-file branch 2 times, most recently from 21c5283 to fe30885 Compare November 4, 2026 14:20
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-5-scale-color branch from 5734f04 to 6e7c64d Compare November 4, 2026 14:20
@timedin-de

Copy link
Copy Markdown

Sorry i didnt have the time to check it currently. But my two cents regarding trigger. For my use case we would need the linear scale as a number input for higher/lower than, which is not possible using choice/options (and is not ideal using number input), for a "How many people do you want to signup" (with Name etc per Person).

Thats why i would seperate it from color, as i See no real usecase for color trigger (except some specific quizzes or sth, and then its also possible to use the choice or Text input)

@Chartman123

Copy link
Copy Markdown
Collaborator

@timedin-de did you already have a look at this feature request? #1728

For me, it sounds a bit more like this is what you would like to achieve?

@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-4-file branch from fe30885 to f1898c5 Compare November 4, 2026 16:51
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-5-scale-color branch from 6e7c64d to 7124f48 Compare November 4, 2026 16:51
@timedin-de

Copy link
Copy Markdown

@timedin-de did you already have a look at this feature request? #1728

For me, it sounds a bit more like this is what you would like to achieve?

Yes a proper implementation would probably be better, but as you already posted there, its a rather complicated edge case probably not beeing implemented in near future.

My case was just this workaround (similar to our current Google forms, [in Gforms we use a nested checkbox "you want to signup more people?]), was:

"How many attendants" (1-5)
Name 1
Adress 1
if attendants > 1:
Name 2
Adress 2
if attendants > 2:
....

@Chartman123

Copy link
Copy Markdown
Collaborator

Ok, but why would you need the linear scale then instead of the radio question?

@timedin-de

timedin-de commented Nov 4, 2026 •

Copy link
Copy Markdown

Ok, but why would you need the linear scale then instead of the radio question?

I guess Radio doesnt support < and > (so in this use case you would need to have 1 Participant in Branch one, 2 Participants in Branch 2 etc.

With < you only need one new Participant per Branch

Branch 1: Name 1
Branch 2: Name 1 and Name 2

vs
Branch 1: Name 1
Branch 2: Name2

@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-5-scale-color branch from 7124f48 to bdd436e Compare November 5, 2026 11:10
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-4-file branch 2 times, most recently from b287cc5 to 9214258 Compare November 7, 2026 15:29
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-5-scale-color branch from bdd436e to 8e890c3 Compare November 7, 2026 15:29
@AndyScherzinger AndyScherzinger changed the title Conditional questions: linear scale and color as trigger Conditional questions: branches on linear scale and color Nov 7, 2026
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-5-scale-color branch from 8e890c3 to 97c9416 Compare November 7, 2026 15:41
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-4-file branch from 9214258 to 2e47a17 Compare November 7, 2026 15:41
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-5-scale-color branch from 97c9416 to d00994a Compare November 7, 2026 17:59
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-4-file branch from 2e47a17 to b8de1b0 Compare November 8, 2026 18:03
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-3-date-time branch 2 times, most recently from 0bec16a to 24f0959 Compare November 10, 2026 12:34
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-5-scale-color branch 2 times, most recently from 91a0a27 to fc8b80a Compare November 10, 2026 15:10
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-3-date-time branch 2 times, most recently from 3598ecd to a1c0441 Compare November 10, 2026 15:17
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-5-scale-color branch 2 times, most recently from 711d211 to 51c398d Compare November 10, 2026 17:54
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-3-date-time branch from a1c0441 to 0bc7c22 Compare November 10, 2026 17:54
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-5-scale-color branch from 51c398d to c4ec966 Compare November 10, 2026 18:25
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-3-date-time branch from 0bc7c22 to 643e52e Compare November 10, 2026 18:25
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-5-scale-color branch from c4ec966 to 5bbaa47 Compare November 10, 2026 18:32
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-3-date-time branch from 643e52e to d6c463e Compare November 10, 2026 18:32
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-5-scale-color branch from 5bbaa47 to 7e93f48 Compare November 10, 2026 18:40
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-3-date-time branch 2 times, most recently from 53b457c to ca124d6 Compare November 10, 2026 18:45
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-5-scale-color branch 2 times, most recently from 156021d to 5f5e67e Compare November 10, 2026 19:10
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-3-date-time branch from ca124d6 to 1aafc3c Compare November 10, 2026 19:10
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-5-scale-color branch from 5f5e67e to 94dfa96 Compare November 10, 2026 21:09
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-3-date-time branch from 1aafc3c to 4d8fc92 Compare November 10, 2026 21:09
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-5-scale-color branch from 94dfa96 to 63723e0 Compare November 10, 2026 22:31
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-3-date-time branch 2 times, most recently from 2e41daa to 1039557 Compare November 10, 2026 22:37
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-5-scale-color branch 2 times, most recently from 4a460ff to d7c866f Compare November 10, 2026 22:52
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-3-date-time branch from 1039557 to 3effcd2 Compare November 10, 2026 22:52
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-5-scale-color branch from d7c866f to db8678b Compare November 10, 2026 23:11
@AndyScherzinger
AndyScherzinger force-pushed the feat/conditional-questions-3-date-time branch from 3effcd2 to 6883e9e Compare November 10, 2026 23:11
Each value of a linear scale gets a row with the same select as on
options, the values at the ends with their labels, e.g. "1 - Strongly
disagree". The jumps are stored in extraSettings.goTo as
{value, target}; as on radio and dropdown questions, there is no
extraSettings.next, and a value without a jump leads to the following
question. A value is an integer from 0 to 10, the range of all scales,
and is matched as a whole number, so "04" counts as 4 as it does for
the answer itself. Narrowing the scale removes the jumps of the values
that are gone, reported in the response header X-Forms-Adjusted.

Based on the linear scale support of #3123 by TimedIn.

Co-Authored-By: TimedIn <git@timedin.net>
Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developing Work in progress enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants