User Tools

Site Tools


formatlikertmatrix

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
formatlikertmatrix [2020/12/21 15:00] – created adminformatlikertmatrix [2023/09/24 16:45] (current) – [formatLikertMatrix - Improve usability of a Likert matrix in a variety of ways] admin
Line 5: Line 5:
   * Format columns based on percentage width of label/statement column   * Format columns based on percentage width of label/statement column
   * Reliably switches to and from mobile accordion mode   * Reliably switches to and from mobile accordion mode
-  * Controls display of  repeating headers display when carry forward or display logic is used+  * Controls display of  repeating header display when carry forward or display logic is used
   * Controls vertical alignment of repeating headers   * Controls vertical alignment of repeating headers
   * Add 'NA' column divider line and adjust scale labels accordingly   * Add 'NA' column divider line and adjust scale labels accordingly
   * Display scale labels in mobile accordion mode   * Display scale labels in mobile accordion mode
   * Hide specified cells   * Hide specified cells
 +  * Compatible with **[[matrixhighlightunanswered|matrixHighlightUnanswered]]**
 +
 +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 ===== ===== Set-up Instructions =====
 ==== Survey Header ==== ==== Survey Header ====
-To make the function available to all questions in the survey, copy the function to the Survey Header inside a script tag: 
 Add the formatLikertMatrix function to the survey header to make it available to any question in the survey.   Go to Look & Feel -> General -> Header edit -> {{::icon_source.jpg?20|}} and paste the provided formatLikertMatrix function JS: Add the formatLikertMatrix function to the survey header to make it available to any question in the survey.   Go to Look & Feel -> General -> Header edit -> {{::icon_source.jpg?20|}} and paste the provided formatLikertMatrix function JS:
 <code> <code>
Line 18: Line 20:
 </code> </code>
 Alternatively, paste the formatLikertMatrix function JS into a question's JS outside the existing Qualtrics functions to make it available to questions on the page. Alternatively, paste the formatLikertMatrix function JS into a question's JS outside the existing Qualtrics functions to make it available to questions on the page.
-==== Multiple Choice Question ====+==== Matrix Question ====
 === Question Settings === === Question Settings ===
 Set the following single choice Likert Matrix options: Set the following single choice Likert Matrix options:
Line 33: Line 35:
 </code> </code>
  
-To override the default options, specify the desired options in the second function argument as an object. For example:+To override the default options, specify the desired **[[formatlikertmatrix#options|options]]** in the second function argument as an object. For example:
 <code> <code>
 Qualtrics.SurveyEngine.addOnload(function() { Qualtrics.SurveyEngine.addOnload(function() {
- formatLikertMatrix(this,{});+ formatLikertMatrix(this,{labelWidthPercent:30,lastNA:true});
 }); });
 +</code>
 +=== Question/Choice Text ===
 +To specify text to be shown only in mobile accordion mode, place it inside a hidden span with the class mfInstr. For example:
 +<code>
 +1<span class="mfInstr" style="display:none;"> - Extremely Dissatisfied</span> 
 </code> </code>
 ===== Options ===== ===== Options =====
-==== labelsBottom ==== +==== allRepeatEvery ==== 
-**labelsBottom** specifies whether scale labels should be repeated on the bottomSet to true to turn on bottom labels+**allRepeatEvery** specifies how often to show repeated headers when Repeat Headers 'All' is checked. 
 + 
 +Default: 1  
 +==== hideCells ==== 
 +**hideCells** is an object that specifies the cells to be hiddenFormat for specifying cells is:\\ 
 +scalePt:[choiceNum1,choiceNum2,...] 
 + 
 +//Example://\\ 
 +hideCells: {2:[1,4,7],6:[3,5]} 
 +==== labelWidthPercent ==== 
 +**labelWidthPercent** specifies the width of the label column as a percentage of question width. The remaining width is divided evenly among the other columns. 
 + 
 +Default: 35 
 +==== lastNA ==== 
 +**lastNA** set to true to add a divider before the last column and adjust scale labels. 
 + 
 +Default: false 
 +==== midHeaderAlign ==== 
 +**midHeaderAlign** specifies the vertical alignment of repeated middle labels. Possible values are top, middle, and bottom. 
 + 
 +Default: %%"middle"%% 
 +==== minHeaderRepeatBot ==== 
 +**minHeaderRepeatBot:** specifies the minimum number of rows before showing repeated headers on bottom when 'Bottom' or 'Both' is turned on. 
 + 
 +Default: 0 
 +==== minHeaderRepeatMid ==== 
 +**minHeaderRepeatMid** specifies the minimum number of rows before showing repeated headers in the middle when 'Middle' or 'Both' is turned on. 
 + 
 +Default: 0 
 +==== NAdividerStyle ==== 
 +**NAdividerStyle** specifies the CSS style of the **[[formatlikertmatrix#lastNA|lastNA]]** divider.
  
-Default: false +Default: %%"1px solid #BBBBBB"%% 
 +====== Qualtrics Wiki ====== 
 +[[start|Qualtrics Wiki]]
formatlikertmatrix.1608580846.txt.gz · Last modified: by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki