Accordion Behaviour in Matrix Question | XM Community
Skip to main content
Solved

Accordion Behaviour in Matrix Question

  • July 22, 2022
  • 4 replies
  • 294 views

Forum|alt.badge.img

Hi There,
I have created a matrix question, pulled the width over to the right so the question displays as an accordion:
Capture1.PNGDefault behaviour is that when a Choice is selected from the "Current" group, the accordion collapses, and the "Future" group accordion expands - see next image.
Capture2.PNGWhen a Choice is selected from the "Future" group, the accordion does not collapse - see next image
Capture3.PNGMy question is:
Is there a way to have the "Future" accordion behave the same as the "Current" accordion - i.e. collapse on select?
Thanks in advance.

Best answer by TomG

Yes, but you need to write JavaScript to do it (which is quite tricky). You might be interested in this forceAccordion function.

4 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6084 replies
  • Answer
  • July 22, 2022

Yes, but you need to write JavaScript to do it (which is quite tricky). You might be interested in this forceAccordion function.


Forum|alt.badge.img
  • Author
  • 2 replies
  • July 25, 2022

Hi TomG,

Thanks for your help! This looks like it does what I need.


Forum|alt.badge.img

Yes, but you need to write JavaScript to do it (which is quite tricky). You might be interested in this forceAccordion function.

Hey @TomG — I noticed in the link you shared it says the function is available for a fee and to reach out to you here. How do I purchase this function? Thanks


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6084 replies
  • August 16, 2023

Caitlin,

The forceAccordion function is $59 USD. Payment can be made via PayPal.  If you are still interested send me your billing info (name and email required), and I’ll send you an invoice. Once paid, I’ll email a .qsf that includes the function and an example question.

Regards,

Tom