- Posts: 3
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Array question with two-line answer options
- sinaba7
- Topic Author
- Offline
- New Member
Less
More
3 years 4 months ago #208810
by sinaba7
Array question with two-line answer options was created by sinaba7
Hello,
I would like to use the SVO slider (Murphy et al., 2011 --> see picture) in a survey . I think an array question type would be suitable but I don't know how to add a two-line description to the answer options ("You receive", "Other receives" one below the other).
Does any of you have an idea?
Thanks in advance,
Sina
I would like to use the SVO slider (Murphy et al., 2011 --> see picture) in a survey . I think an array question type would be suitable but I don't know how to add a two-line description to the answer options ("You receive", "Other receives" one below the other).
Does any of you have an idea?
Thanks in advance,
Sina
Attachments:
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12923
- Thank you received: 3977
3 years 4 months ago #208821
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Array question with two-line answer options
Hi, Sina,
like this?
Your answer options:
<span style="text-align:center">20<br>|<br>70</span>
<span style="text-align:center">25<br>|<br>65</span>
...
And to get the text into the uppper left corner use this javascript snippet
Insert it into the question text (source code mode)
and also this css.
Joffm
like this?
Your answer options:
<span style="text-align:center">20<br>|<br>70</span>
<span style="text-align:center">25<br>|<br>65</span>
...
And to get the text into the uppper left corner use this javascript snippet
Insert it into the question text (source code mode)
Code:
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ // Identify this question var thisQuestion = $('#question{QID}'); // Insert header text var insertedText = "You receive<br>|<br>Other receive"; $('table.subquestion-list thead tr:last td:first', thisQuestion).addClass('inserted-header').append(insertedText); }); </script>
and also this css.
Code:
<style type="text/css">td.inserted-header { font-weight: bold; text-align: center; vertical-align: middle !important; } </style>
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12923
- Thank you received: 3977
3 years 4 months ago - 3 years 4 months ago #208852
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Array question with two-line answer options
To add:
There is a workaround in the respective section of the manual
manual.limesurvey.org/Workarounds:_Manip...Off_Matrix_Interface
It will not work in version 3.x.
There is a workaround in the respective section of the manual
manual.limesurvey.org/Workarounds:_Manip...Off_Matrix_Interface
It will not work in version 3.x.
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 years 4 months ago by Joffm.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3593
3 years 4 months ago #208866
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 Array question with two-line answer options
Would there be enough interest to warrant a custom question theme?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13643
- Thank you received: 2491
3 years 4 months ago #208871
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Array question with two-line answer options
Without JS ? Can be great
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- sinaba7
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
3 years 4 months ago - 3 years 4 months ago #208883
by sinaba7
Replied by sinaba7 on topic Array question with two-line answer options
Thank you so much, Joffm! The ideas from your first reply work out perfectly
Last edit: 3 years 4 months ago by sinaba7.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3593
3 years 4 months ago - 3 years 4 months ago #208969
by tpartner
The theme is fully functional without JavaScript enabled. JavaScript is only used to load the dynamic values in the top and bottom labels.
Note, due to the buggy nature of LS4, I don't recommend using it there yet - bugs.limesurvey.org/view.php?id=16876
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Array question with two-line answer options
Here is a custom question theme - github.com/tpartner/LimeSurvey-Social-Value-OrientationDenisChenu wrote: Without JS ? Can be great
The theme is fully functional without JavaScript enabled. JavaScript is only used to load the dynamic values in the top and bottom labels.
Note, due to the buggy nature of LS4, I don't recommend using it there yet - bugs.limesurvey.org/view.php?id=16876
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 3 years 4 months ago by tpartner.
The following user(s) said Thank You: DenisChenu, holch
The topic has been locked.