Can anyone help me with the following JS code? only the first part is working.
what i’m trying to do here (pardon my JS knowledge) is hide QID35 if the answer to QID34 is “Not applicable”
given that QID34 is Matrix Table (likert) type and QID35 is multiple choice with force response and display logic for one of the statement
I don’t want to use display logic as it will create page break and the two questions must be in one page.
Qualtrics.SurveyEngine.addOnload(function() {
// hide next question from start
jQuery("#QID35").hide();
// when current question is clicked
this.questionclick = function(event, element) {
// create variabe with clicked answer and check
var selectedChoice = this.getChoiceRecodeValue()
console.log(selectedChoice)
// show next question if condition is met
if (selectedChoice !== "6") {
jQuery("#QID35").show();}
// in case answer is switched, hide again
// else{
// jQuery("#QID35").hide();
// }
}
});
Thanks in advance!
Hide Question Based on Likert Response - JavaScript Help Needed
Best answer by vgayraud
Qualtrics.SurveyEngine.addOnReady(function()
{
jQuery("#QID35").hide();
this.questionclick = function(event, element) {
if (this.getSelectedAnswerValue(this.getSelectedChoices()) !== "6") {
jQuery("#QID35").show();
}
else {
jQuery("#QID35").hide();
}
}
});
Sign up
Already have an account? Login
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join.
No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login with Qualtrics
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join. No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login to the Community
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join.
No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login with Qualtrics
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join. No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.

















