Thanks
Best answer by NiC
View originalBest answer by NiC
View originalTomG said:
You can hide them in the TOC with JS that you put in the TOC library message. It has been a long time since I needed to do this, so the code I have is prototypejs where the name of the block is toc_sep:
In the toc_sep question, just click the Jump Button:
Qualtrics.SurveyEngine.addOnReady(function() {
jQuery("#JumpButton").click();
});
TomG wrote:
In the toc_sep question, just click the Jump Button:
Once you've completed all the blocks, only the top_sep block is left as incomplete. You can count the number of completed blocks and store it in an embedded variable then click the Next button in toc_sep when you have competed all the blocks. Say you have 5 blocks.
Count completed blocks in your TOC library message:
Qualtrics.SurveyEngine.setEmbeddedData("completeBlocks",jQuery("li.Complete").length);
In toc_sep:
if(parseInt("${e://Field/completeBlocks}") < 5) jQuery("#JumpButton").click();
else jQuery("#NextButton").click();
If you don't want to go back to the TOC after the last block is completed, change 5 to 4.
HI TomG ,
Thanks so much for this great explanation.
I am just a bit stuck on putting the JS code into a Library Message. I can't seem to add JS into the html message block. Am I missing something?
Thanks so much!
Jess
https://www.qualtrics.com/community/discussion/comment/36650#Comment_36650You have to put JS in a
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.