- Posts: 1
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Array dual scale with question in the middle!!!
- jimmyrazor
- Topic Author
- Offline
- New Member
Less
More
5 years 6 months ago #175180
by jimmyrazor
Array dual scale with question in the middle!!! was created by jimmyrazor
Hi community,
I have to implement a lime survey version of an existing paper and pencil questionnaire. In this questionnaire we have a couple of items that have to be answered on two scales.
The question type "Array dual scale" seems to be appropriate for this issue, but the standard layout is Item - Scale A - Scale B.
It is important for us to use the layout we have in the paper and pencil version, and that ist Scale A - Item - Scale B (see attached scheme).
I'm sure, this is possible in LimeSurvey. Does anyone have a solution for us?
I have to implement a lime survey version of an existing paper and pencil questionnaire. In this questionnaire we have a couple of items that have to be answered on two scales.
The question type "Array dual scale" seems to be appropriate for this issue, but the standard layout is Item - Scale A - Scale B.
It is important for us to use the layout we have in the paper and pencil version, and that ist Scale A - Item - Scale B (see attached scheme).
I'm sure, this is possible in LimeSurvey. Does anyone have a solution for us?
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
5 years 6 months ago #175185
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Array dual scale with question in the middle!!!
What version of LimeSurvey is used? Workarounds depend on the version.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
5 years 6 months ago #175187
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 dual scale with question in the middle!!!
I don't remind if it work, can depend on version.
But trye
or
After : maybe some width to fix
But trye
Code:
|in the middle|
Code:
|middle|
After : maybe some width to fix
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.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
5 years 6 months ago #175204
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Array dual scale with question in the middle!!!
Never seen using two separators. Was that introduced in LS3?
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
5 years 6 months ago #175210
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 dual scale with question in the middle!!!
No, it exist before …
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.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11639
- Thank you received: 2737
5 years 6 months ago #175219
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Array dual scale with question in the middle!!!
Is this described anywhere in the manual? I have never seen this before either!
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
5 years 6 months ago #175220
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 dual scale with question in the middle!!!
Maybe at a time, must be done (but i didn't add the function )holch wrote: Is this described anywhere in the manual? I have never seen this before either!
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.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
5 years 6 months ago #175222
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 dual scale with question in the middle!!!
It's completely broken in 3.x:
- adding unnecessary HTML elements
- not handling widths
Here is a working JavaScript solution. Add this to the source of the question:
Sample survey attached:
- adding unnecessary HTML elements
- not handling widths
Here is a working JavaScript solution. Add this to the source of the question:
Code:
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ // Identify this question var thisQuestion = $('#question{QID}'); // Calculate widths var tableWidth = $('table.subquestion-list:eq(0)', thisQuestion).width(); var sqWidth = $('.col-answers:eq(0)', thisQuestion).width(); var sqPercent = (sqWidth/tableWidth)*100; var answersCount = $('.col-responses col', thisQuestion).length; var answersWidth = (tableWidth-sqWidth)/answersCount; var answersPercent = (answersWidth/tableWidth)*100; // Move table elements and remove unnecessary elements $('col.separator:eq(0)', thisQuestion).parent().after($('col.col-answers:eq(0)', thisQuestion).parent()).remove(); $('thead tr.ls-heading.groups td.header_separator:eq(0)', thisQuestion).after($('thead tr.ls-heading.groups th:eq(0)', thisQuestion)).remove(); $('thead tr.ls-heading:last td.header_separator:eq(0)', thisQuestion).after($('thead tr.ls-heading:last td:eq(0)', thisQuestion)).remove(); $('tr.answers-list', thisQuestion).each(function(i) { $('.dual_scale_separator:eq(0)', this).after($('th.answertext', this)).remove(); }); // Assign new widths $('.col-answers', thisQuestion).css('width', sqPercent+'%'); $('.col-responses col', thisQuestion).css('width', answersPercent+'%'); }); </script>
Sample survey attached:
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
5 years 6 months ago #175232
by DenisChenu
Else : i don't know what width you use for screenshot …
Without update i have
And with this script :
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 dual scale with question in the middle!!!
Please : report issuetpartner wrote: It's completely broken in 3.x:
What unnecessary element ? remind we need to show it too with sub-question|middle|right on phone (reason of ls-label-xs-visibility) and need accessibility.- adding unnecessary HTML elements
Yes : right, except with 3 input for "subquestion" part width : i don't see how to set this.tpartner wrote: - not handling widths
Else : i don't know what width you use for screenshot …
Without update i have
And with this script :
Code:
<script>$(document).on('ready pjax:scriptcomplete',function(){ $("#question{QID} col.col-answers").width("0"); $("#question{QID} col.separator:not(.right_separator)").width("30%"); $("#question{QID} col.separator.right_separator").width("0"); }); </script>
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.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
5 years 6 months ago - 5 years 6 months ago #175233
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 dual scale with question in the middle!!!
The OP simply wanted the subquestion text in the middle. There was no mention of left/right text. I simply used your example for sub-questions using current vanilla theme, screen width ~1028px and you can see the results in my first screenshot.What unnecessary element ? remind we need to show it too with sub-question|middle|right on phone (reason of ls-label-xs-visibility) and need accessibility.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 5 years 6 months ago by tpartner.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
5 years 6 months ago #175243
by DenisChenu
When user set "subquestion width" : it's the subquestion width part
If it not set : i prefer to keep 33% see discussion here : bugs.limesurvey.org/view.php?id=11726
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 dual scale with question in the middle!!!
Yep, the 33% automatic width is to wide if there are middle and right … and this make a total width of 66% for all parts …tpartner wrote: The OP simply wanted the subquestion text in the middle. There was no mention of left/right text. I simply used your example for sub-questions using current vanilla theme, screen width ~1028px and you can see the results in my first screenshot.
When user set "subquestion width" : it's the subquestion width part
If it not set : i prefer to keep 33% see discussion here : bugs.limesurvey.org/view.php?id=11726
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.