Thomas Gibbons Consulting Qualtrics Wiki

Contact TomG on Qualtrics Community

User Tools

Site Tools


matrixhighlightunanswered

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

Highlight Unanswered Matrix Statements - Forced Response

Request Response Example

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
  • 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 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 → and paste the provided matrixHighlightUnanswered function JS inside a script tag:

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

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 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

matrixhighlightunanswered.txt · Last modified: 2023/09/24 15:45 by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki