Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Partial Randomization Answers

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 10 months ago - 7 years 10 months ago #156722 by tpartner
Replied by tpartner on topic Partial Randomization Answers
For that version, you will need to use a script something like this:

Code:
<script type="text/javascript" charset="utf-8">  
  $(document).ready(function() {
 
    // The answer code to place in the last position
    var fixedCode = '3';
 
    // Identify this question
    var q1ID = {QID};
    var thisQuestion = $('#question'+q1ID);
 
    // Move the "fixed" row to the end
    $('.answers-list', thisQuestion).append($('div[id^="javatbd"][id$="X'+q1ID+fixedCode+'"]', thisQuestion));
 
    });
</script>

Sample survey attached:

File Attachment:

File Name: limesurvey...7-10.lss
File Size:14 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 7 years 10 months ago by tpartner.
The following user(s) said Thank You: ChristianHermawan
The topic has been locked.
  • ChristianHermawan
  • ChristianHermawan's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 10 months ago #156794 by ChristianHermawan
Replied by ChristianHermawan on topic Partial Randomization Answers
Works!

Thankssss
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose