I have a single question with four answer options displayed horizontally. I am trying to move them so that they align with an HTML table which appears directly above.I have managed to successfully use this syntax to move the first and last answer boxes around.Qualtrics.SurveyEngine.addOnload(function(){ var el1 = $(this.questionId).select('label.SingleAnswer').first(); el1.style.marginLeft = "80%"; var el4 = $(this.questionId).select('label.SingleAnswer').last(); el4.style.marginLeft = "200%";});How do I select the 2nd and 3rd answer boxes? I've tried $(this.questionId).select('label.SingleAnswer').eq(1); for the second, but this doesn't work.
Hello I am using the syntax below to hide boxes in a matrix table, however they can still be selected while hidden. How do I disable them as well? $('QR~QIDx~1~2').up('td').childElements().invoke('hide'); I've tried replacing the word "hide" with "disable", but that doesn't work for multiple cells. Thanks,
Hello This is probably a very basic question, but I've been trying for ages and can't get it to work. I'm trying to copy the answers from Multi question QID73 into duplicate question QID76 (where this javascript is stored), but it's not working. It does seem to work if I select one answer, which leads me to think I need to use different syntax for a multi question? I've tried it without the variable, and without the loop, but nothing works. Any suggestions? var valQ10 = "parseInt(${q://QID73/SelectedChoicesRecode})"; for (var i = 1; i <= 12; i++) { if (valQ10==i) { this.setChoiceValueByRecodeValue(i,true); } } Thanks!
Hello Apologies if this has already been asked, but I couldn't find it anywhere. I've set up a theme in Look & Feel with Style/Primary Color as Orange. This makes the buttons orange, and the selected options orange, as required. However, when an option is selected, the background of the page changes to light orange. How do I stop this? I've tried uploading a white image as the background, which works, but now an orange border appears around the question when an option is selected instead, which isn't ideal!. Any ideas on how I keep the background as white when an option is selected (while still keeping the orange theme)? ! ! Thanks!
How do you say "set code 2 of QID123 (multi) to be true/selected" in JavaScript? I know that you can use "this" to refer to the current question (see below), but how do you refer to QID123 if it's not the current question? this.setChoiceValue(2,true); (The reason I'm not adding this JavaScript to QID123 is because it's skipped)
Hello Can anyone help me understand how to use JavaScript within Qualtrics? I'm trying to say "If QID1=2 then set QID2=2", but I can't work out how to write the "QID1=2" part. This is what I have so far, but how do I refer to QID1 from within QID2? They are both Multiple Choice. [Within QID2] Qualtrics.SurveyEngine.addOnload(function() { if ( ??? getChoiceValue(2) == true) {this.setChoiceValue(2, true)} }); I've been looking at the API documentation, but there are very few examples, and none on how to use it to refer to another question. Thanks, Tricia
Already have an account? Login
Enter your 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.