Repository navigation
Support the hidden question type in the web app - #71
Merged
Merged
Conversation
A `hidden` question is filled from the survey link (a partner, module or wave), never by the respondent: - Question gets an optional `default`, parsed from the model output and written to the XLSForm `default` column (only when a question has one); - `required` is never set on hidden, in the parser or the workbook; - hidden fields don't count as answerable questions in the quality checks; - the survey view shows them as filled from the link, with their default; - the generator and repair prompts say when to use it, with the Kobo and LimeSurvey caveats. Closes #69 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since formtransform 0.10.0 (#68),
hiddenis a registered question type. This PR makes the web app handle it properly. A hidden field holds a value from the survey link, such as a partner, module or wave, and is never filled in by the respondent.What changed
Questiongets an optionaldefault. The parser reads it fromdefault(ordefault_value), and ahiddenquestion is always parsed withrequired: false.xlsform_generator.tswrites the XLSFormdefaultcolumn, but only when some question has a default. Forms without defaults keep their current layout. Therequiredcell of ahiddenrow is left empty.isAnswerable()treatshiddenlikenote. Hidden fields don't count towards the 8–15 /maxQuestionsbounds or research-question coverage, and they aren't checked for wording.SurveyViewshows a hidden field with its own badge and the line "filled from the survey link". It also shows the default, or says that there is none, and never shows answer options.generate-instructions.mddocuments thedefaultfield and adds a "Hidden fields" rule: when to use one, no choices, norequired, adefaultwhen a link may leave the value out.?d[/<root>/<name>]=…, and in LimeSurvey the link parameter is the question code.src/lib/agents/hidden.test.ts. They check thatvalidateSubsetgives no findings, and that one conversion to LimeSurvey turns the hidden question into anSquestion withhidden=1anddefault=direkt.hidden-partner, also goes through pyxform and ODK Validate. It only adds new snapshot entries; existing ones are unchanged.Choices made
defaultis written for any question that has one, not only forhidden. The prompt asks for it onhiddenonly.Checks (local)
bun run lint,bun run check(0 errors),bun run test(160 passed),bun run test:e2e(67 vitest + 14 pytest passed) andbun run buildall pass.Closes #69
🤖 Generated with Claude Code