Hi, I would like to know how I can remove the ranking option from just one group in the drag-and-drop question type. I only need the ranking in certain groups/boxes. I tried with the code jQuery("#"+this.questionId+" .rank").hide(); But it removes the ranking in all the groups. Thanks !
Hi there, if you still need, I was able to put this in place by using an interval of 1 millisecond that hides the ranks in the 1st group and shows the ranks in the 2nd and 3rd groups. I'm sure there is a cleaner way to do this, but to put the interval method in place, add the below to the PGR question's JavaScript:
Qualtrics.SurveyEngine.addOnload(function()
{
/*Place your JavaScript here to run when the page loads*/
});
Qualtrics.SurveyEngine.addOnReady(function()
{
/*Place your JavaScript here to run when the page is fully displayed*/
var qid = this.questionId;
function hiderank() {
var group1hide = document.getElementById(qid+'group0').getElementsByClassName('rank');
var group2show = document.getElementById(qid+'group1').getElementsByClassName('rank');
var group3show = document.getElementById(qid+'group2').getElementsByClassName('rank');
jQuery(group1hide).css({"display":"none"});
jQuery(group2show).css({"display":"block"});
jQuery(group3show).css({"display":"block"});
}
var hide = setInterval(hiderank, 1);
});
Qualtrics.SurveyEngine.addOnUnload(function()
{
/*Place your JavaScript here to run when the page is unloaded*/
});
Qualtrics.SurveyEngine.addOnPageSubmit(function() {
clearInterval(hiderank);
});
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.