Freezing questions in Qualtrics

Sometimes with Qualtrics, we may find that we want to freeze a question so that a participant can't interact with it.

Why? Perhaps you are creatively displaying a participant's previous answer (i.e., piping a previous answer) to a question in a slider format, but you don't want to allow the participant to mess with the slider. You just want to show them what they answered before.

To illustrate this, let's say a participant answered "40" for this question:

On another page in the survey, you want to remind the participant what they wrote but still in that slider format (see this page for how to do this with piped text: https://www.qualtrics.com/support/survey-platform/survey-module/question-options/add-default-choices/). And maybe you want to ask them for why they answered in this way, like this:
If you use default choices, you can show participant's their previous answer in this slider format, but this also allows the participant to "play" around with that slider, and you probably want to freeze it in place.

To do this, you will need the Question ID# of the question you're trying to freeze in place (this is the number that follows the Q when you first create the question, you can find it by inspecting that question, or by piping into somewhere and seeing what QID shows up). 

In the javascript box of that question you're trying to freeze in place, you want this line: 

setTimeout(function(){ jQuery('.QID10').find('*').off(); },500);

Important: You want to replace ".QID10" with whatever the QID number is of the question you're trying to freeze.

What it does is set a half second timeout, upon that timeout, it looks for that question and turns off all event handlers on all elements within that element. A fancy way of saying it turns it off.

Here it is in the javascript box (notice it's in the section that's addOnReady):
Happy Qualtrics!

Also, thanks to my programming partner, John, for helping me with this puzzle!



Comments

Popular Posts