Skip to content

Forms: branching ("only show if") (#845) - #898

Merged
mbhewitt merged 1 commit into
mainfrom
feat/form-branching
Nov 29, 2026
Merged

mbhewitt merged 1 commit into
mainfrom
feat/form-branching

Conversation

@mbhewitt

Copy link
Copy Markdown
Owner

Refs #845. Mew asked for branching ("go for branching", 2026-11-29). The Camping form needs it: one set of questions for tent campers and another for RV campers.

  • Each question can be set to Only show if an earlier question has a given answer (for a checkboxes question, if that box is ticked).
    • It works through chains: a question under a hidden question is hidden too.
    • Saving is refused unless the condition points to an earlier question and to one of its choices.
  • Saving answers: hidden questions aren't required, and the server drops any answers sent for them.
  • Fill page: questions appear and disappear as the volunteer answers.
  • Editor: an "Only show if…" picker on each question, listing "Earlier question → choice".

No migration: the condition is stored inside the questions JSON. New e2e test covers the save checks, required-only-when-shown, dropped answers, and the question appearing in the UI. Locally, 39 (5 tests) passes. Footer 2027.G.00898.C.

🤖 Generated with Claude Code

Mew 2026-11-29: "go for branching". A question can be shown only when an
earlier question is answered a given choice (checkboxes: ticked). Hidden
questions, and those under them, aren't required and their answers are
dropped server-side. Editor: "Only show if…" picker. Footer 2027.G.00898.C.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mbhewitt
mbhewitt merged commit 942f907 into main Nov 29, 2026
1 check passed
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