- Posts: 2
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
tpartner wrote: Well, you can use the {SUBMITID} variable (which is available AFTER the first page submission) and the JavaScript modulus operator to load a hidden short-text question with sequential numbers between 1 and 4.
Note though, that the sequential number will increment with every respondent, even those who don't complete the survey.
Add this script to the source of a short-text question:Code:<script type="text/javascript" charset="utf-8"> $(document).ready(function() { var submitID = {SAVEDID}; // Hide this question $('#question'+qID).hide(); // Find sequential number between 1 and 4 based on the SUBMITID var conditionNumber = (submitID % 4) + 1; // Load the hidden question $('#question'+qID+' input.text').val(conditionNumber); }); </script>
.
Place the script in the source of a short-text question on a page AFTER the first QUESTION PAGE has been submitted.After the first page submission.... So after the first question is filled in, by the second question fill in this script?
See conditions or relevance - www.limesurvey.org/manual/Setting_conditions .And how do i make the different questionaires for the three groups?
{if( is_empty(myQuestion), rand(1,4), myQuestion )}