- Posts: 9
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
The same random order
- vic54ga
- Topic Author
- Offline
- New Member
Less
More
5 years 9 months ago #171233
by vic54ga
The same random order was created by vic54ga
Hello, I have two questions with multiple answers. In both questions, answers are being displayed with a random order.
I need the answers on Question1 to display with the same random order as answers in Question1.
Is there a way to save the random order generated for answers on Question1 so I can use it on the answers of Question2?
Thanks!!
I need the answers on Question1 to display with the same random order as answers in Question1.
Is there a way to save the random order generated for answers on Question1 so I can use it on the answers of Question2?
Thanks!!
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10108
- Thank you received: 3593
5 years 9 months ago #171236
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic The same random order
LimeSurvey version?
Are both questions on the same page and sequential?
Are both questions on the same page and sequential?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- ollehar
- Offline
- LimeSurvey GmbH Employee
Less
More
- Posts: 522
- Thank you received: 108
5 years 9 months ago #171254
by ollehar
Replied by ollehar on topic The same random order
Not without JavaScript, AFAIK.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10108
- Thank you received: 3593
5 years 9 months ago #171255
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic The same random order
Yup, that's why I asked about the survey structure.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- vic54ga
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
5 years 9 months ago #171260
by vic54ga
Replied by vic54ga on topic The same random order
Ok thank you!
Yes, it´s on the same page and sequencial. Version is 2.5 RC
Yes, it´s on the same page and sequencial. Version is 2.5 RC
The topic has been locked.
- holch
- Away
- LimeSurvey Community Team
Less
More
- Posts: 11655
- Thank you received: 2742
5 years 9 months ago #171267
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic The same random order
You should definitely make an upgrade. RC stands for "Release Candidate", so it is not even a stable version of Limesurvey. This should not be used for production.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10108
- Thank you received: 3593
5 years 9 months ago #171312
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic The same random order
If the questions are on the same page and sequential, in 2.x, you can add this script to the source of the first question.
Sample survey attached:
Code:
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ // Identify the questions var q1ID = {QID}; var q1 = $('#question'+q1ID); var q2 = $(q1).nextAll('.multiple-opt:eq(0)'); var q2ID = $(q2).attr('id').replace(/question/, ''); // Loop through the Q1 sub-questions $('div.answer-item', q1).each(function(i) { // Move the corresponding Q2 sub-question var thisCode = $(this).attr('id').split('X'+q1ID)[1]; $('div.subquestion-list', q2).append($('div.answer-item[id$="X'+q2ID+thisCode+'"]', q2).parent()); }); }); </script>
Sample survey attached:
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
The topic has been locked.
- hamstr
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
4 years 7 months ago #188988
by hamstr
Replied by hamstr on topic The same random order
Hi! I came across this post when looking for a solution to a similar issue - only difference is that the mc-questions are on different pages. Is there a way to transfer the order across different question groups, too?
Best,
hamstr
Best,
hamstr
The topic has been locked.