Hi!
Hope you can help me out! I'm quite new to Java so I'm quite stuck.
I'm trying to add display logic to a loop (Q4, ...) that goes over all choices/statements displayed in a previous matrix question (Q3). The matrix question contains 10+ choices/statements, of which a random set of 5 is displayed to respondents. Depending on which value was selected for each choice/statement of the matrix, a different set of questions should pop up in the loop.
So far I got the matrix question with the random set generator (Q3) and I set up a loop containing Q4, which should pop up for all statements from Q3 that were given a value of (let's say) 1 or 5. That part obviously needs some Java that I'm failing at. I got this:
Qualtrics.SurveyEngine.addOnload(function()
{
var_name = "${lm://Field/2}" + "_display_order"; //to keep track of which choice/statement is currently in the loop
Qualtrics.SurveyEngine.setEmbeddedData(var_name,"${lm://CurrentLoopNumber}");
no = getChoiceRecodeValue("Q3_" + "${lm://Field/2}"); //no idea what the choiceID should be :(
var x = document.getElementById("QID4");
x.style.display="none";
if (no == "7") {
x.style.display="block"
}
else {
x.style.display="none"
}
});
I'd really appreciate any help! Thank you!
Display logic in loop following randomized matrix
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.
