- Posts: 155
- Thank you received: 2
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
- Topic Author
- Offline
- Premium Member
- jelo
- Offline
- Platinum Member
- Posts: 5070
- Thank you received: 1263
manual.limesurvey.org/Question_type_-_Mu...Other.27_.28other.29
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
- mrli999
- Topic Author
- Offline
- Premium Member
- Posts: 155
- Thank you received: 2
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.
manual.limesurvey.org/Question_type_-_Mu...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?
- jelo
- Offline
- Platinum Member
- Posts: 5070
- Thank you received: 1263
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.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?
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
- tpartner
- Away
- LimeSurvey Community Team
- Posts: 10634
- Thank you received: 3697
Not without a little JavaScript magic.Can I move to the second or third one, not the the last one?
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.
<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:
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
- jelo
- Offline
- Platinum Member
- Posts: 5070
- Thank you received: 1263
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
- tpartner
- Away
- LimeSurvey Community Team
- Posts: 10634
- Thank you received: 3697
Why do you say that? Did you try it?This workaround will work as long as randomizing items are off.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
- tpartner
- Away
- LimeSurvey Community Team
- Posts: 10634
- Thank you received: 3697
Nope, the divs are still present so many workarounds are broken.BTW: Is the current LS 2.5 version now compatible with the proven workarounds of LS 2.06? Or still divs around?
This should work in both 2.06 and 2.5:
<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.
- jelo
- Offline
- Platinum Member
- Posts: 5070
- Thank you received: 1263
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
- mrli999
- Topic Author
- Offline
- Premium Member
- Posts: 155
- Thank you received: 2
tpartner wrote:
Nope, the divs are still present so many workarounds are broken.BTW: Is the current LS 2.5 version now compatible with the proven workarounds of LS 2.06? Or still divs around?
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!!!