Welcome to the LimeSurvey Community Forum

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

How to design this kind of questions? please see the image for details, thanks

  • mrli999
  • mrli999's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
8 years 7 months ago #134120 by mrli999
How to design this kind of questions? please see the image for details, thanks
The topic has been locked.
More
8 years 7 months ago #134135 by jelo
Enable the other option (available on many questiontypes, not all). You can enter the text for the "other item" in the advanced options.
www.limesurvey.org/manual/Question_type_...Other.27_.28other.29

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The following user(s) said Thank You: tpartner, mrli999
The topic has been locked.
  • mrli999
  • mrli999's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
8 years 7 months ago #134148 by mrli999

jelo wrote: Enable the other option (available on many questiontypes, not all). You can enter the text for the "other item" in the advanced options.
www.limesurvey.org/manual/Question_type_...Other.27_.28other.29


thank you very much! In that case the other must be the last one? Can I move to the second or third one, not the the last one?
The topic has been locked.
More
8 years 7 months ago #134152 by jelo

mrli999 wrote: thank you very much! In that case the other must be the last one? Can I move to the second or third one, not the the last one?

That's a weakness. There may be some workarounds available, which can move the item. I currently don't have a workaround at hand, but you might get more answers soon.

Please vote for the feature request to allow more other fields at certain positions.
bugs.limesurvey.org/view.php?id=7367

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 7 months ago #134153 by tpartner

Can I move to the second or third one, not the the last one?

Not without a little JavaScript magic.

For a radio question, add something like this to the question source and adjust "otherRow" as required. In this example, the Other item is inserted into the fourth position.

Code:
<script type="text/javascript" charset="utf-8">    
  $(document).ready(function() {  
 
    // Identify this question
    var thisQuestion = $('#question{QID}');
 
    // The row where "Other" is to be placed
    var otherRow = 4
 
    // Re-position "Other"
    $('li.answer-item:eq('+(otherRow-2)+')', thisQuestion).after($('li.answer-item:last', thisQuestion));
 
  });
</script>



Sample survey attached:

File Attachment:

File Name: limesurvey...0-11.lss
File Size:14 KB

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: mrli999
The topic has been locked.
More
8 years 7 months ago #134160 by jelo
This workaround will work as long as randomizing items are off.
Not sure if the items can be identified by item name instead of by position.

BTW: Is the current LS 2.5 version now compatible with the proven workarounds of LS 2.06? Or still divs around?

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 7 months ago - 8 years 7 months ago #134162 by tpartner

This workaround will work as long as randomizing items are off.

Why do you say that? Did you try it?






Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 8 years 7 months ago by tpartner.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 7 months ago #134163 by tpartner

BTW: Is the current LS 2.5 version now compatible with the proven workarounds of LS 2.06? Or still divs around?

Nope, the divs are still present so many workarounds are broken.

This should work in both 2.06 and 2.5:

Code:
<script type="text/javascript" charset="utf-8">    
  $(document).ready(function() {  
 
    // Identify this question
    var thisQuestion = $('#question{QID}');
 
    // The row where "Other" is to be placed
    var otherRow = 4
 
    // Re-position "Other"
    $('.answers-list .answer-item:eq('+(otherRow-2)+')', thisQuestion).after($('.answers-list .answer-item:last', thisQuestion));
 
  });
</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.
More
8 years 7 months ago #134165 by jelo
Sorry for not making clear the intention of asking. This was not a bug report.
Testing under what version? LS 2.5 or LS 2.06LTS?

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • mrli999
  • mrli999's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
8 years 7 months ago #134166 by mrli999

tpartner wrote:

BTW: Is the current LS 2.5 version now compatible with the proven workarounds of LS 2.06? Or still divs around?

Nope, the divs are still present so many workarounds are broken.

This should work in both 2.06 and 2.5:

Code:
<script type="text/javascript" charset="utf-8">    
  $(document).ready(function() {  
 
    // Identify this question
    var thisQuestion = $('#question{QID}');
 
    // The row where "Other" is to be placed
    var otherRow = 4
 
    // Re-position "Other"
    $('.answers-list .answer-item:eq('+(otherRow-2)+')', thisQuestion).after($('.answers-list .answer-item:last', thisQuestion));
 
  });
</script>


Thank you very much! Your solution is perfect!!!
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose