Stream: implementers
Topic: questionnaire with explicit opt-out
Josh Mandel (Oct 25 2016 at 20:23):
Is there a documented pattern for modeling a question like "tell me the state where you live, or if you prefer not to, tell me why"? (i.e. to collect a state *or* a reason, as separate fields)?
Lloyd McKenzie (Oct 25 2016 at 20:46):
Child question with an enableWhen triggered on whether the parent question is enabled or not.
Pascal Pfiffner (Oct 25 2016 at 21:10):
This is not quite the "open-choice" question type, but maybe you can model it this way? I.e. instead of "other", you say "prefer not to say" and capture additional text.
Lloyd McKenzie (Oct 25 2016 at 21:11):
It's not really the same thing. Open choice means "pick one of these or add your own value".
Josh Mandel (Oct 25 2016 at 21:29):
Thanks @Lloyd McKenzie! And for DSTU2... you'd create a question with a (group -> question) for the "why not" ?
Lloyd McKenzie (Oct 25 2016 at 22:37):
You'd do the same, but there's an extension for the "enable-when" bit.
Brian Postlethwaite (Oct 25 2016 at 23:04):
We have done this using our validation extensions with just 2 regular fields, ensuring that one or other is entered.
The enable when would require selecting an option to then enable one or other of the edit fields.
Lloyd McKenzie (Oct 26 2016 at 00:45):
@Brian Postlethwaite Actually, enableWhen can be triggered simply by a question being answered or not, independent of the answer chosen.
Last updated: Apr 12 2022 at 19:14 UTC