Thomas Gibbons Consulting Qualtrics Wiki

Contact TomG on Qualtrics Community

User Tools

Site Tools


forceaccordion

forceAccordion - Force mobile matrix accordion format on all screen sizes

The forceAccordion function forces use of the mobile matrix accordion formatting on all screen sizes.

  • Full expand, collapse, and auto-expand/collapse functionality
  • No label or other question formatting required
  • Supports single select and multi-select likert matrices
  • Supports standard likert and profile matrices
  • Supports screen resizing!
  • Compatible with the matrixHighlightUnanswered function

Here is a quick video demonstration:

This function is available for a reasonable fee. Contact TomG on the Qualtrics Community to learn more.

Set-up Instructions

Add Function To Survey

Add the forceAccordion function to the survey header to make it available to any page/question in the survey. Go to Look & Feel → General → Header edit → and paste the provided forceAccordion function JS:

<script>/*Paste forceAccordion function JS here*/</script>

Alternatively, paste the forceAccordion function JS into a question's JS outside the existing Qualtrics functions to make it available to questions on the page.

JavaScript Function Call

Add JS to call the forceAccordion function from the likert matrix question as follows:

Qualtrics.SurveyEngine.addOnload(function() {
	forceAccordion(this);
});

To use in conjunction with the matrixHighlightUnanswered function use this JS:

Qualtrics.SurveyEngine.addOnload(function() {
	forceAccordion(this);
	var qobj = this;
	setTimeout(function() { matrixHighlightUnanswered(qobj); },200);
});

Qualtrics Wiki

forceaccordion.txt · Last modified: 2023/10/25 08:54 by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki