====== 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|matrixHighlightUnanswered]]** function
Here is a quick video demonstration:\\
{{ ::forceAccordion.mp4?650 |forceAccordion Demonstration}}
This function is available for a reasonable fee. Contact **[[https://community.qualtrics.com/inbox/conversation?with=373|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 -> {{::icon_source.jpg?20|}} and paste the provided forceAccordion function JS:
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|matrixHighlightUnanswered]]** function use this JS:
Qualtrics.SurveyEngine.addOnload(function() {
forceAccordion(this);
var qobj = this;
setTimeout(function() { matrixHighlightUnanswered(qobj); },200);
});
====== Qualtrics Wiki ======
[[start|Qualtrics Wiki]]