Home In Qualtrics with Java: How to hide an answer option under certain conditions in a loop and merge
Reply: 0

In Qualtrics with Java: How to hide an answer option under certain conditions in a loop and merge

user1206
1#
user1206 Published in August 15, 2018, 5:38 am

I am trying to hide the fourth option of a question in a loop and merge if one of the loop and merge fields refers to a certain name. here is the code i am using at the moment:

     Qualtrics.SurveyEngine.addOnload(function()
{
	if("${lm://Field/2}"=="76ers"){
		$('QR~${lm://CurrentLoopNumber}_QID27~4').hide();
}
	
});    

the idea is, if Field/2 is "76ers", then it should hide the fourth option of this question. I am very new to using java in qualtrics so there is a lot that could be going wrong here. The loop is randomized, and field 2 refers to an embedded data field which at some point will refer to the 76ers. I want to hide the fourth choice option when it does that - but no joy with the code I am using.

In case it helps, I attach the screen where I want is for the fourth option down to be hidden.

enter image description here

Please let me know if anyone has a solution!

Many thanks,

Josh

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.294952 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO