Yes, I could do it as you mentioned, as I wrote in the original post. The issue was that I had 100 options, and they can change monthly, so it would make sense to automate it through Javascript.I found a suitable way, suggested by TomG , and I'll leave it here if anybody has the same issue:jQuery("#"+this.questionId+" label.SingleAnswer").each(function() { var label = jQuery(this); if(label.text() == "${e://Field/Name}") label.closest("li").hide();});
https://www.qualtrics.com/community/discussion/comment/33209#Comment_33209Hello Tom,I just tried it and it worked perfectly! Thank you very much for your help and patience!Best regards,Francisco Leandro.
https://www.qualtrics.com/community/discussion/comment/33204#Comment_33204I understand, so basically I would need to do something like: var qid = this.questionId; var choice_contents = Qualtrics.SurveyEngine.QuestionInfo[qid].Choices; var i; for (i = 0; i < choice_contents.length; i++) { if (choice_contents[i] == "${e://Field/Name}"){var a = i+1; jQuery("#"+this.questionId+" input[choiceid=" + a + "]").closest("li").hide(); }}I tried this without success... unfortunately i'm completely unfamiliar with javascript syntax, could you give me any feedback please?
https://www.qualtrics.com/community/discussion/comment/33200#Comment_33200Thank you for your answer, I was trying to do it through:jQuery("#"+this.questionId+" input[Choice_____=${e://Field/Name}]").closest("li").hide()but I just don't know how to find what I should write instead of "ChoiceID", in order to get the question to be hidden based on the name...I also tried to find the choiceID of the name, and then apply the code you wrote above, but I can't get it to work...var a = getChoicesFromVariableName("${e://Field/Name}");var id=a[0];jQuery("#"+this.questionId+" input[choiceid=" + id + "]").closest("li").hide();Do you have any suggestions you're willing to share, please?
https://www.qualtrics.com/community/discussion/comment/23503#Comment_23503Hello Tom,Can this code be adapted to hide an option of the question, but using the naming of the option instead of the id? For example: if the multiple choice question has several names, is it possible to write a code that hides the option "John"?Best regards,Francisco.
Already have an account? Login
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.