Welcome to the LimeSurvey Community Forum

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

Exclude specific answer from randomization

More
5 years 11 months ago #166452 by stephanied
Replied by stephanied on topic Exclude specific answer from randomization
Thank you!!!!!!
The topic has been locked.
More
5 years 5 months ago #174534 by stephanied
Replied by stephanied on topic Exclude specific answer from randomization
I'm looking for an updated code for version 3.14
Multiple numeric input with two answers fixed to the bottom.

I've tried to alter the code but cannot get it to work..

Thanks in advance!
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 5 months ago #174556 by tpartner
Replied by tpartner on topic Exclude specific answer from randomization
This will work in 3.x:

Code:
<script type="text/javascript" charset="utf-8">
  $(document).on('ready pjax:scriptcomplete',function(){
 
    // Identify this question ID
    var qID = '{QID}';
 
    // List the sub-question codes to be placed at the end of the list
    // (comma-separated)
    var lastItems = ['SQ007','SQ008'];
 
    // Insert the last items
    $.each(lastItems, function(i, val) {
      $('#question{QID} li[id^="javatbd"]:last').after($('#question{QID} li[id^="javatbd"][id$="X'+qID+val+'"]'));
    });
  });
</script>

Sample survey attached:

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: FreshLemonUser
The topic has been locked.
More
4 years 9 months ago #185102 by FreshLemonUser
Replied by FreshLemonUser on topic Exclude specific answer from randomization
Hi Tpartner, you made my day again...

I found this too useful to solve my troubles.

i can combine this www.limesurvey.org/forum/can-i-do-this-w...ing-questions#185098

Thanks again. let me publish my lss file inorther to share my solution with the community.

Best regards.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose