====== matrixHighlightUnanswered - Highlight unanswered matrix statements ====== The **matrixHighlightUnanswered** (formerly likertHighlightUnanswered) function highlights unanswered matrix statements by adding a border around the rows or columns (if transposed or maxdiff) that have not been answered when at least one statement has been answered. It works when either the "Force Response" or "Request Response" option is turned on.\\ ;#; **Force Response Example** ;#; {{ ::likerthighlightunanswered.png?600 |Highlight Unanswered Matrix Statements - Forced Response}} ;#; **Request Response Example** ;#; {{ ::likertHighlightUnanswered_Request.png?600 |Highlight Unanswered Matrix Statements - Request Response}} **matrixHighlightUnanswered** is compatible with the following and automatically detects all settings: * Matrix types: Likert, Bipolar, Maxdiff * Likert Answer types: Allow one answer, Allow multiple answers * Likert Formats: Standard likert, Profile * Functions: **[[formatlikertmatrix|formatLikertMatrix]]**, **[[scaledmatrix|scaledMatrix]]**, **[[matrixprofiletextabove|matrixProfileTextAbove]]**, and **[[mfbipolarmatrix|mfBipolarMatrix]]** * All Likert, Bipolar and Maxdiff options including Mobile friendly, Transpose table, and Position text above * Statement groups **matrixHighlightUnanswered** supports: * Custom border styles (default is a 2 pixel dashed red border) * Alternative validation message * Window resizing (i.e., switching from desktop to mobile and vice versa) 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 matrixHighlightUnanswered 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 matrixHighlightUnanswered function JS inside a script tag: Alternatively, paste the matrixHighlightUnanswered 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 matrixHighlightUnanswered function to apply it to the matrix question as follows: Qualtrics.SurveyEngine.addOnload(function() { matrixHighlightUnanswered(this); }); To override the default options, specify the desired **[[matrixHighlightUnanswered#options|options]]** is the second function argument as an object. For example: Qualtrics.SurveyEngine.addOnload(function() { matrixHighlightUnanswered(this,{highlightErrorStyle:"2px solid red"}); }); ==== Options ==== === highlightErrorStyle === The CSS style of the error box border(s). default: %%"2px dashed red"%% === message === HTML that overrides the built-in Qualtrics error text. Empty string ("") does __not__ override built-in Qualtrics error text. Default: %%""%% ====== Qualtrics Wiki ====== [[start|Qualtrics Wiki]]