Lock multiple choice when block reappears | XM Community
Skip to main content

Hello, and thank you in advance for reviewing my post.

TLDR: Can a multiple-choice question be locked when the block reappears in the survey?

I have a block with a text entry question and a multiple-choice question. Further in the survey, the text response is displayed, and the participant is given the option to edit the text response. In the survey flow, the block is duplicated. When the user returns to this block, I want them to be able to edit the response in the text entry, but I want the multiple-choice question to be locked with the answer provided when they progressed from the block initially.

Again, thank you.

 

 

I think this can be done, if you set an embedded field like “BlockDisplayed” and set it to True after this block.

Then you can use JavaScript to set the second question to read only afterwards, or completely hide it (might be better) based on the value in the BlockDisplayed.

So use display logic to check if the second question should be shown or not like this:

Set BlockDisplayed embedded data to False

Show block first time

Set BlockDisplayed embedded data to True

Show block second time (Now second question will be hidden based on display logic)


I saw this response in another post to a similar question:

Qualtrics.SurveyEngine.addOnload(function() {
var inputs = jQuery("#"+this.questionId+" input[type=radio]");
inputs.click(function() { inputs.prop("disabled",true); });
});

Lock in first answer for multiple choice questions? | XM Community (qualtrics.com)


I think this can be done, if you set an embedded field like “BlockDisplayed” and set it to True after this block.

Then you can use JavaScript to set the second question to read only afterwards, or completely hide it (might be better) based on the value in the BlockDisplayed.

So use display logic to check if the second question should be shown or not like this:

Set BlockDisplayed embedded data to False

Show block first time

Set BlockDisplayed embedded data to True

Show block second time (Now second question will be hidden based on display logic)

 

Thank you @JesperAndersen. Your response led me to a solution. I created an embedded field “BlockDisplayed” set to “True” after the block. In the survey, I set the question display to “is not equal to” True. So it displays on the first pass of the block and not again. Greatly appreciate your insight.


Thank you for the response @MikeW. I found that post and tried that script, but it allows you to answer/change the response 1 time each time you visit the block.


Leave a Reply