Solved
Hiding blocks from the Table of Contents
Our team have a number of different surveys that we are trying to combine, and I would like to display these in a table of contents. However, several of these surveys involve multiple blocks, but I don't want all of these blocks to display individually on the TOC. Unfortunately, these blocks involve Loops & Merges so can't be combined into one (which would be the simplest solution to prevent them from displaying...)
Does anyone on here have a way of hiding specific blocks from the TOC? Perhaps based on the block names?
We could change the block names to include a specific phrase to easily identify which blocks to leave out, if this would be possible. I'm not familiar with java script or other coding languages to be able to write this, so would appreciate some help!
Someone else had written code to hide incomplete blocks - perhaps this could be adapted to hide blocks based on a different criteria instead?
<script type="text/javascript">
Qualtrics.SurveyEngine.addOnload(function()
{
if($('Toc')) {
$('Toc').select('.Incomplete').invoke('hide');
}
});
</script>
From: https://stackoverflow.com/questions/36190662/disabling-table-of-contents-links-in-qualtrics
Thanks in advance for your help!
Best answer by morodav
A team member managed to find the Flow ID for blocks with Loop & Merge turned on.
For future users: the flow IDs for these blocks are FL_L#. For instance, with the block mentioned above, the flow ID if Loop & Merge is turned on would be FL_L4.
The javascript to hide Loop & Merge blocks from the Table of Contents therefore becomes, e.g. for a block with Flow ID FL_4 (as it displays in the survey flow):
jQuery("#FL_L4").hide();
Hope that's helpful for others in the future.
##Update:
We added this code to the Look & Feel section of Qualtrics, in the 'General' tab. We included it under "Header", directly into the text box (without clicking "edit", which opens up an HTML editor so doesn't work). Make sure to add <script></script> around the javascript.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
