Lock in first answer for multiple choice questions? | XM Community
Skip to main content
Solved

Lock in first answer for multiple choice questions?

  • May 1, 2022
  • 2 replies
  • 98 views

Forum|alt.badge.img+1

Hello! I appreciate you checking out my post.
I want to make multiple choice questions which, once a participant clicks their answer, can't be changed (since I want their first instinctive response rather than after they have second-guessed it). Is this lock-in-first-answer situation possible with Javascript code?
Thank you very much!

Best answer by TomG

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

2 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • Answer
  • May 2, 2022

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


Forum|alt.badge.img+1
  • Author
  • May 4, 2022

Thank you so much TomG ! I really appreciate you taking the time to answer my question and resolve what would have been a major problem for my project. I hope you have a great day! :D