Welcome to the LimeSurvey Community Forum

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

Multi response, random and fixed

  • SurveyDennis
  • SurveyDennis's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
7 years 1 week ago - 7 years 1 week ago #152620 by SurveyDennis
Multi response, random and fixed was created by SurveyDennis
I have a multi response question with the other option.

I have also one exclusive answer option.


Answer 1
Answer 2
Answer 3
Answer 4
Other specify
None of the above


I need to randomize all answers except the last three.
So answer 4, other specify and none of the above need to stay in that order.
Those always need to be fixed in that order.

Is that possible?

Be SurveyFriendly too! Fight against boring surveys! www.SurveyFriendly.com
Last edit: 7 years 1 week ago by SurveyDennis.
The topic has been locked.
  • SurveyDennis
  • SurveyDennis's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
7 years 6 days ago - 7 years 6 days ago #152638 by SurveyDennis
Replied by SurveyDennis on topic Multi response, random and fixed
I have made a workaround on the above.
But I have one minor challenge.

I can't get the answer option below "other" but only next to it.
Anyone an idea?

DemoSurvey:
here

<script type='text/javascript'>
/* Place option 5 at the end of the randomized list */
$(document).ready(function() {

//Answer 4 always before the other option
$('#javatbd986572X244X973SQ004').insertBefore('#javatbd986572X244X973other');

//Answer 5 always after other
$('#javatbd986572X244X973SQ005').insertAfter('#javatbd986572X244X973other');

});
</script>

Be SurveyFriendly too! Fight against boring surveys! www.SurveyFriendly.com
Last edit: 7 years 6 days ago by SurveyDennis.
The topic has been locked.
  • SurveyDennis
  • SurveyDennis's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
7 years 6 days ago #152655 by SurveyDennis
Replied by SurveyDennis on topic Multi response, random and fixed
I found a solution -

Instead of adding the Answer5 option after other I placed it after the answer-container.
Probably not the most clean solution but it does do the trick for now.

//Answer 5 always after other
//$('#javatbd986572X244X973SQ005').insertAfter('#javatbd986572X244X973other');
$("#javatbd986572X244X973SQ005").insertAfter(".answer-container");

Be SurveyFriendly too! Fight against boring surveys! www.SurveyFriendly.com
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose