- Posts: 16
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Miscellaneous questions about survey presentation (design / randomization)
- syssecsurvey
- Topic Author
- Offline
- New Member
Less
More
3 years 9 months ago - 3 years 9 months ago #203002
by syssecsurvey
Miscellaneous questions about survey presentation (design / randomization) was created by syssecsurvey
Dear LimeSurvey community,
Thanks to the help of this wonderful community, I already made great progress with my survey, but there are still some issues I cannot quite solve on my own.
Design / CSS issues
1. Is is possible to make only selected words bold in the column headers of array questions?
2. In "Multiple Choice with comment" questions, the answer text is aligned to the right if the answer takes up more than one line. Single-line answers are still left-aligned. How can I fix this?
Randomization issues
3. I have two multiple choice questions with the same set of answers. In general, the order of the answers should be randomized, but the order of the answers should be consistent between these two questions. I'm aware that the "Get order from previous question" functionality currently only is supported for Array (Numbers) questions (which, BTW, doesn't even work for this question type in my survey). Is there a workaround to manually replicate the "Get order from previous question" functionality for multiple choice questions?
4. I have two sets of question groups (G1, G2) about certain topics (letters A-H) and a rather complex mechanism shows participants up to 3 question groups from each set (say, G1-D, G1-F, G1-B, G2-F, G2-B, G2-D). The order in which the question groups within G1 and G2 are shown should be randomized. Currently I just have two randomization groups for G1 and G2, but tests revealed that participants were confused by the question groups in G2 not showing up in the same (randomized) order as those in G1. Is there a way to ensure that the second set of question groups is displayed in the same (randomized) order as the first set (G1-D, G1-F, G1-B, G2-D, G2-F, G2-B )?
Thanks a lot in advance!
Thanks to the help of this wonderful community, I already made great progress with my survey, but there are still some issues I cannot quite solve on my own.
Design / CSS issues
1. Is is possible to make only selected words bold in the column headers of array questions?
2. In "Multiple Choice with comment" questions, the answer text is aligned to the right if the answer takes up more than one line. Single-line answers are still left-aligned. How can I fix this?
Randomization issues
3. I have two multiple choice questions with the same set of answers. In general, the order of the answers should be randomized, but the order of the answers should be consistent between these two questions. I'm aware that the "Get order from previous question" functionality currently only is supported for Array (Numbers) questions (which, BTW, doesn't even work for this question type in my survey). Is there a workaround to manually replicate the "Get order from previous question" functionality for multiple choice questions?
4. I have two sets of question groups (G1, G2) about certain topics (letters A-H) and a rather complex mechanism shows participants up to 3 question groups from each set (say, G1-D, G1-F, G1-B, G2-F, G2-B, G2-D). The order in which the question groups within G1 and G2 are shown should be randomized. Currently I just have two randomization groups for G1 and G2, but tests revealed that participants were confused by the question groups in G2 not showing up in the same (randomized) order as those in G1. Is there a way to ensure that the second set of question groups is displayed in the same (randomized) order as the first set (G1-D, G1-F, G1-B, G2-D, G2-F, G2-B )?
Thanks a lot in advance!
Last edit: 3 years 9 months ago by syssecsurvey.
The topic has been locked.
- Joffm
- Away
- LimeSurvey Community Team
Less
More
- Posts: 12942
- Thank you received: 3979
3 years 9 months ago - 3 years 9 months ago #203012
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Miscellaneous questions about survey presentation (design / randomization)
Hi,
"<span style='font-weight:normal'>This is my </span>bold<span style='font-weight:normal'> header</span>"
In my opinion it is better to set all headers to "normal" in your theme.
Either you enter this in the question text or (without the <style> tags) in your custom.css.
In the second case all subquestions are left-aligned
Joffm
And of course the question: Which version are you using?
As headers are bold by default you may set the rest to "normal"1. Is is possible to make only selected words bold in the column headers of array questions?
"<span style='font-weight:normal'>This is my </span>bold<span style='font-weight:normal'> header</span>"
In my opinion it is better to set all headers to "normal" in your theme.
Code:
.ls-answers .ls-heading th { font-weight: 400; }
2. In "Multiple Choice with comment" questions, the answer text is aligned to the right if the answer takes up more than one line. Single-line answers are still left-aligned. How can I fix this?
Either you enter this in the question text or (without the <style> tags) in your custom.css.
In the second case all subquestions are left-aligned
Code:
<style> .form-horizontal .control-label { text-align: left;} </style>
Joffm
And of course the question: Which version are you using?
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 years 9 months ago by Joffm.
The following user(s) said Thank You: syssecsurvey
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
3 years 9 months ago #203014
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 Miscellaneous questions about survey presentation (design / randomization)
3. If the questions are on the same page, this can be done directly with JavaScript.
If on separate pages, there are two options:
- Record the first question order in local memory and then apply it to the second question via JavaScript. This is easier but will not work across multiple devices.
- Record the first question order in a hidden question and then apply it to the second question via JavaScript. Slightly trickier but will work across multiple devices.
4. More or less the same answer as #3 but you will need to format the question codes so that there are corresponding identifiers in both groups.
If on separate pages, there are two options:
- Record the first question order in local memory and then apply it to the second question via JavaScript. This is easier but will not work across multiple devices.
- Record the first question order in a hidden question and then apply it to the second question via JavaScript. Slightly trickier but will work across multiple devices.
4. More or less the same answer as #3 but you will need to format the question codes so that there are corresponding identifiers in both groups.
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: syssecsurvey
The topic has been locked.
- syssecsurvey
- Topic Author
- Offline
- New Member
Less
More
- Posts: 16
- Thank you received: 0
3 years 8 months ago #203245
by syssecsurvey
Replied by syssecsurvey on topic Miscellaneous questions about survey presentation (design / randomization)
Thanks for your, as always, excellent advice!
@Joffm: I just tried both your suggestions and they work like a charm. Thanks!
@tpartner: Glad to learn this can be done! I think I need a little more detail on the "with JavaScript" part though. The questions are on the same page. The LimeSurvey version I use is 3.22.7+200225.
@Joffm: I just tried both your suggestions and they work like a charm. Thanks!
@tpartner: Glad to learn this can be done! I think I need a little more detail on the "with JavaScript" part though. The questions are on the same page. The LimeSurvey version I use is 3.22.7+200225.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
3 years 8 months ago #203261
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 Miscellaneous questions about survey presentation (design / randomization)
Can you attach a small sample survey (.lss file) containing only the relevant questions?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- syssecsurvey
- Topic Author
- Offline
- New Member
Less
More
- Posts: 16
- Thank you received: 0
3 years 8 months ago #203361
by syssecsurvey
Replied by syssecsurvey on topic Miscellaneous questions about survey presentation (design / randomization)
Sure, see the attached *.lss file. I hope everything is self-explanatory. The problem areas look like this and these are instructions.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
3 years 8 months ago - 3 years 8 months ago #203388
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 Miscellaneous questions about survey presentation (design / randomization)
To synchronize the answer rows of two consecutive array questions, place this script in the source of the second array:
To synchronize the answer rows of two consecutive multiple-choice questions, place this script in the source of the second multiple-choice:
Regarding "Is there a way to ensure that the second set of question groups is displayed in the same (randomized) order as the first set (G1-D, G1-F, G1-B, G2-D, G2-F, G2-B )?", I don't know how you expect me to demonstrate that if you provide a survey full of dummy questions.
Code:
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ // Identify some stuff var qID = '{QID}'; var thisQuestion = $('#question'+qID); var prevQuestion = thisQuestion.prev('.question-container'); var prevID = prevQuestion.attr('id').replace(/question/, ''); // Loop through previous question rows $('tr[id^="javatbd"]', prevQuestion).each(function(i) { var thisCode = $(this).attr('id').split('X'+prevID)[1]; // Move the row $('table.subquestion-list tbody', thisQuestion).append($('tr[id$="X'+qID+thisCode+'"]', thisQuestion)); }); }); </script>
To synchronize the answer rows of two consecutive multiple-choice questions, place this script in the source of the second multiple-choice:
Code:
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ // Identify some stuff var qID = '{QID}'; var thisQuestion = $('#question'+qID); var prevQuestion = thisQuestion.prev('.question-container'); var prevID = prevQuestion.attr('id').replace(/question/, ''); // Loop through previous question rows $('li[id^="javatbd"]', prevQuestion).each(function(i) { var thisCode = $(this).attr('id').split('X'+prevID)[1]; // Move the row $('.answers-list ul:eq(0)', thisQuestion).append($('li[id$="X'+qID+thisCode+'"]', thisQuestion)); }); }); </script>
Regarding "Is there a way to ensure that the second set of question groups is displayed in the same (randomized) order as the first set (G1-D, G1-F, G1-B, G2-D, G2-F, G2-B )?", I don't know how you expect me to demonstrate that if you provide a survey full of dummy questions.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 3 years 8 months ago by tpartner.
The topic has been locked.
- syssecsurvey
- Topic Author
- Offline
- New Member
Less
More
- Posts: 16
- Thank you received: 0
3 years 8 months ago #203425
by syssecsurvey
Replied by syssecsurvey on topic Miscellaneous questions about survey presentation (design / randomization)
Thank you! I just tried the first two solutions and everything works as desired.
Regarding the third issue: Since this is about the order in which different question groups are displayed, I thought that individual questions within each question group were not required and it would be sufficient to have differences in the names / descriptions of each question group. Could you please specify what I should add for you to be able to demonstrate the solution?
Regarding the third issue: Since this is about the order in which different question groups are displayed, I thought that individual questions within each question group were not required and it would be sufficient to have differences in the names / descriptions of each question group. Could you please specify what I should add for you to be able to demonstrate the solution?
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
3 years 8 months ago #203478
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 Miscellaneous questions about survey presentation (design / randomization)
Sorry I misunderstood, I thought you wanted to control the order of answers in the following groups, not the order of the groups themselves.
Unfortunately, I don't have a solution.
Unfortunately, I don't have a solution.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.