Checkbox questions with "Other" should allow adding multiple others #185
Replies: 4 comments 12 replies
-
To clarify, the current "Other…" field accepts a freeform text string, which can contain one or multiple items. Maybe we can clarify this somehow in the current UI. |
Beta Was this translation helpful? Give feedback.
-
This should work. |
Beta Was this translation helpful? Give feedback.
-
I’ve fleshed out the interaction a bit more and made a high fidelity front-end prototype here: https://lea.verou.me/stateof/mocks/custom-options/ custom-options.mp4What may not be super clear from the video:
While the prototype supports both single-choice and multiple-choice questions, only the latter are discussed below, since the UX for single choice questions is very similar to the current one (does not support multiple custom options, since there is no reason to). FunctionalityBoth multiple and single choice questions can opt-in to allowing custom option(s). Single choice questions can only have one custom option, multiple choice questions have multiple by default. By default, any number of custom options is allowed, but this can be limited to a specific number. In that case, the number is communicated via the placeholder/aria-label. By default only one field is shown, but questions can opt-in to showing more, to encourage more question options. It is possible to have questions without any predefined options, only custom ones. This gives us freeform lists for free. If there are no predefined options, the UI adapts in a few some small ways to best serve these use cases:
UX
Architecture & ImplementationChanges to question specThree extra fields:
To minimize options, these could be combined into one Data modelCurrently, each custom field has the same name, which should not change the current behavior when there is only one, backend code just needs to check whether there may also be multiple items and store an array in that case. It also means the logic works out of the box for single choice questions, with no conditional logic. Prototype code
MVPCompromises we can make to reduce engineering effort, in order (compromises to make earlier are listed first):
FutureBetter support for user cases where custom options are outliersNot all questions need custom answers at the same frequency. For some, the custom answers are the primary means of response, and the predefined answers exist just to get the respondent in the right headspace. In some, custom answers are needed only some of the time. And lastly, there are questions, that cannot be purely multiple choice, but rarely need a custom response. Just like we can use an initial custom count > 1 to encourage custom answers more, we could also support an initial custom count of 0 to encourage them less. What would that look like? It could show a discreet "Custom…" button instead of a placeholder option. Alternatively, we could style the existing text field to just be less prominent in these questions. Sentiment chips on custom optionsIdeally, custom options should also support sentiment chips but that's a lot of work (both implementation and UX) so let's defer it for this survey. |
Beta Was this translation helpful? Give feedback.
-
It looks like we're all agreed that the changes would be beneficial, and it comes down to how much benefit and how much cost. Sacha, can you comment on what implementing this would mean for the State of HTML survey? Would we risk delaying it, or would this mean a significant amount of work on your end? Lea, do we have indicators that people are more likely to add significantly more information with this UI change? |
Beta Was this translation helpful? Give feedback.
-
There is a multiple choice question template that includes multiple tools with checkboxes, plus an "Other…" option, which shows a text field. Here is a screenshot of both states, from State of CSS 2023:
The problem is that this only allows adding one "Other…" option, which forces the survey designer to pollute the survey with a ton of options (which biases the results) to minimize the need for users to need the "Other…" option.
Respondents can always enter comma-separated values, but this is both non-obvious, and becomes increasingly tedious as the number of values increases.
I present some UI ideas below to facilitate adding multiple custom options.
General considerations
These apply across all UI ideas:
UI concept 1: "Add other" button
A potential UI for allowing multiple custom answers, without making the common case of entering one more tedious would be to convert the "Other…" option into an "Add Other…" button which inserts (and focuses) a text field option every time it’s clicked.
Notes:
Pros:
Cons:
UI concept 2: Custom by default, auto-insert another
Update: I’ve now made a high fidelity prototype for this
custom-options.mp4
In this design, a custom field is present by default (potentially with styling to make it less prominent than it currently is). Typing in it inserts another (placeholder) one underneath, so entering more items is as simple as hitting tab (or enter). Hitting tab on an empty field does not insert another item.
Pros:
Cons:
Beta Was this translation helpful? Give feedback.
All reactions