- Posts: 38
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
As you do not want to display this order to the respondent, you have to hide the question.you meant by hidden question.
Please Log in to join the conversation.
Yes, you would need a hidden question for every question you want the order recorded for.How do you suggest this script to be implemented, for each question individually?
Please Log in to join the conversation.
$(document).on('ready pjax:scriptcomplete',function(){ //Identify the questions var thisQuestion = $('#question{QID}'); var hiddenQuestion = $(thisQuestion).nextAll('.text-short:eq(0)'); // Create an array of answer codes var answerCodes = []; $('li.answer-item', thisQuestion).each(function(i) { answerCodes.push($(this).attr('id').split('X{QID}')[1]); }); // Load the hidden question $('input:text', hiddenQuestion).val(answerCodes); }); </script>
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Yes, I did it like that, I'm guessing that is why it wasn't working, when I disabled that I got it to work, although now I get the question shown in the survey. Is there another way in which I can hide the question but still have the order written to it?How do you hide the question? Via the GUI with "always hide this question"?
This won't work because if the question is hidden this way, it does not appear in the source code and thus Javascript can not write to it.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.