Welcome to the LimeSurvey Community Forum

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

In a Multiple choice question, how do I get the other option first.

  • gorp
  • gorp's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 1 month ago #213701 by gorp
Hi, 
I am using a Multiple choice question, with the other option. However, in order to encourage respondents to write their own answers I would like to have the "other option" where they can write their of option first rather than last as it is now. How can I do this in the best way. 

Thanks in advance, 

 
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 1 month ago #213703 by Joffm
Hi,
Use this
[url] manual.limesurvey.org/Workarounds:_Manip...meSurvey_version_3.x :[/url]

fixedAnswers = number of answers

 

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 1 month ago #213720 by tpartner
Or, simpler if you are only concerned with the "Other"item:

Code:
<script type="text/javascript" data-author="Tony Partner">  
  $(document).on('ready pjax:scriptcomplete',function(){
 
    // Move "Other" to the first position
    var otherItem = $('#question{QID} li[id$="X{QID}other"]');
    otherItem.prependTo(otherItem.parent());
    });
</script>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • gorp
  • gorp's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 4 weeks ago #214018 by gorp
Thank you for your answer! Unfortunately I do not get it to work.
What do you mean by: fixedAnswers = number of answers.

Also, the instructions I'm not sure how this should be adjusted:
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
// Sub-question 1 is primary followed by 2 secondaries
secondaryCheckboxes({QID}, 1, 2);
// Sub-question 6 is primary followed by 3 secondaries
secondaryCheckboxes({QID}, 6, 3);
});
</script>

Also, I have four columns of alternatives (which makes the second alternative below not to work).
Any help is much appreciated.
The topic has been locked.
  • gorp
  • gorp's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 4 weeks ago #214019 by gorp
Thanks a lot tpartner! Unfortunately, I have 4 columns of alternative; and this fix only added the "Other"-option on top of the fourth column rather than on top of the first column. Is there a way to fix this?

Many many thanks!
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 weeks ago #214024 by tpartner
You should always give the full requirements, your LimeSurvey version and the question layout in your posts. Indicating that you are using columns would have avoided both Joffm and me wasting time in our replies.

Have a look at this post - forums.limesurvey.org/forum/can-i-do-thi...-multi-column#211722

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • gorp
  • gorp's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 4 weeks ago - 3 years 4 weeks ago #214046 by gorp
My sincere apology for being unclear!
Thank you for the link. However, when adding all items as being last (i.e., after the "Other") forces the other option to be alone in the first column, and all fixed-alternatives to a long second column (even though I've specified 4 columns). I've attached an image. 

Version 4.4.14+210322
I've attached the adapted .lss-file from the linked-example.

Any advice is much appreciated.
 
Last edit: 3 years 4 weeks ago by gorp.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose