- Posts: 26
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Array (numbers) - Can I switch the subquestion text and input box around?
- DB1324
- Topic Author
- Offline
- Junior Member
Less
More
5 years 6 months ago - 5 years 6 months ago #174541
by DB1324
Array (numbers) - Can I switch the subquestion text and input box around? was created by DB1324
Hi all,
I need to mimic the layout of a paper questionnaire as closely as possible. This includes a simple numbers array, which by default displays like this in LimeSurvey:
However, I need to try and display the input box first on the left, and the text to the right, as per the second image:
I don't want to amend the template because that would affect other questions, so it is possible to achieve this switch round any other way?
Thanks!
(We're on Version 2.65.1+170522)
I need to mimic the layout of a paper questionnaire as closely as possible. This includes a simple numbers array, which by default displays like this in LimeSurvey:
However, I need to try and display the input box first on the left, and the text to the right, as per the second image:
I don't want to amend the template because that would affect other questions, so it is possible to achieve this switch round any other way?
Thanks!
(We're on Version 2.65.1+170522)
Attachments:
Last edit: 5 years 6 months ago by DB1324.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
5 years 6 months ago #174552
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 (numbers) - Can I switch the subquestion text and input box around?
Can you attach a small sample survey (.lss file) containing only that question?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- DB1324
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 26
- Thank you received: 0
5 years 6 months ago #174554
by DB1324
Replied by DB1324 on topic Array (numbers) - Can I switch the subquestion text and input box around?
Hi Tony,
Yes, I've attached a sample.
Thanks
Yes, I've attached a sample.
Thanks
Attachments:
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
5 years 6 months ago #174560
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 (numbers) - Can I switch the subquestion text and input box around?
Add this script to the source of the question:
Sample survey attached:
Code:
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ // Move the array cells $('#question{QID} col.answertext').before($('#question{QID} col.col-hidden:eq(0)')); $('#question{QID} tr.subquestion-list').each(function(i) { $('.answertext', this).before($('.answer-item:eq(0)', this)); }); }); </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 following user(s) said Thank You: DB1324
The topic has been locked.
- DB1324
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 26
- Thank you received: 0
5 years 6 months ago #174562
by DB1324
Replied by DB1324 on topic Array (numbers) - Can I switch the subquestion text and input box around?
That's perfect, thank you so much Tony. I really appreciate your help.
The topic has been locked.