Adding Accordion to Choices

Hi! There's currently no out-of-the-box feature like this, but you should be able to build something like this using custom HTML and JavaScript. For example, you could set it up like this:

  • HTML template with checkboxes for all the options
  • JavaScript onclick handlers on all checkboxes that update the JSON task if the checkbox was selected/unselected (you'd just have to decide how you want to store the data about the selected options – you could have a list, or just add a key like "B1": true)
  • function that shows/hides the additional questions when you click on a button or select a checkbox – e.g. by toggling section.style.display = 'none' on the section. Or you could use the <details> element, which gives you an accordion out-of-the-box :slightly_smiling_face:

This thread also asked a similar question and I shared some links and ideas in the comments: