Last active
October 23, 2022 15:03
-
-
Save marketinview/8310ba82acde38be62f007095bbe0278 to your computer and use it in GitHub Desktop.
Qualtrics: Automatically answer a multiple choice question with only one choice and go to next page. #qualtrics #js #jq #mc #carryforward
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Qualtrics.SurveyEngine.addOnReady(function() { | |
var qobj = this; | |
var displayedChoices = []; | |
jQuery.each(qobj.getChoices(), function(index, value) { | |
if(qobj.getChoiceDisplayed(value)) displayedChoices.push(value); | |
}); | |
if(displayedChoices.length == 1) { | |
qobj.setChoiceValue(displayedChoices[0], true); | |
qobj.clickNextButton(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See additional Qualtrics solutions at: https://qualtricswiki.tgibbons.com/doku.php