Table of Contents / Show two blocks on same page | XM Community
Skip to main content
Question

Table of Contents / Show two blocks on same page


Hi All,



I am trying to setup a table of contents that the user returns to after finishing each block. I've used some java script to change the 'next' button to return to the table of contents. However, I've learnt that for the tick box to appear next to the item completed in the TOC you have to not just finished the current block but you have to move onto a new block meaning you have to complete 2 blocks. So that also seems to mean you need at least two pages per question / section. Is there a way to display two blocks on one page or a better way to control the return to the table of contents after each block whilst still maintaining the tick marks?



I would also like to make it so that you don't see the 2nd Block in the table of contents - is that possible? (see pic)



Thanks



Rod



This is the java script code I use in the question (addonready section)

jQuery("#NextButton").unbind("click");

jQuery("#NextButton").click(function() {jQuery("#JumpButton").click() });



!
Hi All,



I googled around and found something interesting which would hide incomplete blocks in the TOC. My javascript knowledge is limited but i wondered whether the script could be adapted to hide any blocks which have the name ending '.. End' (as in the pic)?



https://stackoverflow.com/questions/36190662/disabling-table-of-contents-links-in-qualtrics



What would be the syntax to select Blocks labelled '... End' and hide them?



Thanks



Rod



<script type="text/javascript">

Qualtrics.SurveyEngine.addOnload(function()

{

if($('Toc')) {

$('Toc').select('.Incomplete').invoke('hide');

}

});

</script>
Hi All,



Is there anyone who can help advise on this. I'm a VBA programmer so given some guidance on the write syntax to use and would hope to get this running.



Many thanks in advance



Rod
You can create a block with single question and add JS to click on TOC in onload.



Now you can repeat this block in survey flow after each block and hide this block from the TOC list using JS.
Hi @rondey,



Can you help with the JS code to use for each block? It would be much easier to have JS just on the TOC to exclude blocks named a certain way but if that's not possible I'd be happy to go with the alternate.



Please let me know



Thanks



Rod

Leave a Reply