- Posts: 15
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Can I do a two scale array with numeric input ?
- MaloF
- Topic Author
- Offline
- New Member
Less
More
6 years 6 months ago #159091
by MaloF
Can I do a two scale array with numeric input ? was created by MaloF
I would like to create a question that has only numeric input cell as answers, and to be able to group column with a "subtitle".
I believe this can be seen as a two scale array with numeric values ?
Please see the attachment to fully get my point. In this case, I have two "subtitles" ( France/USA) , each having two column ( NB , ETP )
Is this possible ?
Thanks
I believe this can be seen as a two scale array with numeric values ?
Please see the attachment to fully get my point. In this case, I have two "subtitles" ( France/USA) , each having two column ( NB , ETP )
Is this possible ?
Thanks
Attachments:
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12789
- Thank you received: 3940
6 years 6 months ago #159093
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Can I do a two scale array with numeric input ?
Hello, MaloF,
as far as I see, there is only a normal array(numbers), but with the additional headers.
I am sure somebody will be able to show how you can insert them.
Best regards
Joffm
as far as I see, there is only a normal array(numbers), but with the additional headers.
I am sure somebody will be able to show how you can insert them.
Best regards
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- MaloF
- Topic Author
- Offline
- New Member
Less
More
- Posts: 15
- Thank you received: 0
6 years 6 months ago #159096
by MaloF
Replied by MaloF on topic Can I do a two scale array with numeric input ?
Thanks Joffm, yes this is it, just a normal(Array) with additional headers .
I have no idea how to do it.
I have no idea how to do it.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10634
- Thank you received: 3698
6 years 6 months ago - 6 years 6 months ago #159113
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 Can I do a two scale array with numeric input ?
Well, you could insert those extra headers with JavaScript but it would not work on mobile devices. Probably better to combine the countries with the existing headers or use 2 separate questions.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 6 years 6 months ago by tpartner.
The topic has been locked.
- MaloF
- Topic Author
- Offline
- New Member
Less
More
- Posts: 15
- Thank you received: 0
6 years 5 months ago #159168
by MaloF
Replied by MaloF on topic Can I do a two scale array with numeric input ?
Thanks Tony,
Could you show me how to do it via Javascript (or to point me to a similar answer with javascript code) ? Because I do not need mobile device compatibility and I can't combine the countries with the header as I need to do more complex table as the attached table .
Many thanks
Could you show me how to do it via Javascript (or to point me to a similar answer with javascript code) ? Because I do not need mobile device compatibility and I can't combine the countries with the header as I need to do more complex table as the attached table .
Many thanks
Attachments:
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12789
- Thank you received: 3940
6 years 5 months ago #159170
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Can I do a two scale array with numeric input ?
Well, instead of wasting too much time with these headers, why not just do it like this?
IMO you're always in a hurry when developing surveys.
That's easy, quickly implemented.
The same with your second table. Use different colors for cadres, ETAM, etc.
Joffm
IMO you're always in a hurry when developing surveys.
That's easy, quickly implemented.
The same with your second table. Use different colors for cadres, ETAM, etc.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: MaloF
The topic has been locked.
- MaloF
- Topic Author
- Offline
- New Member
Less
More
- Posts: 15
- Thank you received: 0
6 years 5 months ago #159180
by MaloF
Replied by MaloF on topic Can I do a two scale array with numeric input ?
Thanks Joffm,
Your answer is OK to me . However I would like to proceed to a small adjustment in order to improve readability: I would like to insert a vertical line between each group ( so in your example between column 2 and 3).
I found this post : www.limesurvey.org/forum/can-i-do-this-w...or-an-array-question , but the proposed javascript code doesn't work for Array(Number).
Could you help me with this ?
Thanks
Your answer is OK to me . However I would like to proceed to a small adjustment in order to improve readability: I would like to insert a vertical line between each group ( so in your example between column 2 and 3).
I found this post : www.limesurvey.org/forum/can-i-do-this-w...or-an-array-question , but the proposed javascript code doesn't work for Array(Number).
Could you help me with this ?
Thanks
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10634
- Thank you received: 3698
6 years 5 months ago #159209
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 Can I do a two scale array with numeric input ?
Something like this will insert a vertical bar between columns 2 and 3.
Code:
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { var newColPosition = 3; // Identify this question var thisQuestion = $('#question{QID}'); // Insert a new column $('table.subquestion-list col:eq('+(newColPosition-1)+')', thisQuestion).after('<col class="inserted-column" />'); $('table.subquestion-list thead th:eq('+(newColPosition-1)+')', thisQuestion).after('<th class="inserted-column" />'); $('tr.subquestion-list', thisQuestion).each(function(i) { $('.question-item:eq('+(newColPosition-2)+')', this).after('<td class="inserted-column" />'); }); // Some styling $('.inserted-column', thisQuestion).css({ 'width': '1%', 'background': '#233140', 'padding': '0' }); }); </script>
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
The following user(s) said Thank You: MaloF
The topic has been locked.
- MaloF
- Topic Author
- Offline
- New Member
Less
More
- Posts: 15
- Thank you received: 0
6 years 5 months ago #159213
by MaloF
Replied by MaloF on topic Can I do a two scale array with numeric input ?
Thank you Tony, that's perfect !
The topic has been locked.