- Posts: 1
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Array: Adjust Y-scale width
- pippipelikan
- Topic Author
- Offline
- New Member
Less
More
6 years 1 day ago #166279
by pippipelikan
Array: Adjust Y-scale width was created by pippipelikan
Hi,
Hoping that someone may be able to help me with a basic adjustment to an array question.
Have looked for other similar topics on the forum, like this one:
www.limesurvey.org/forum/design-issues/1...array-text-questions
I am, in essence, trying to adjust the width of the first column. The solution/script (see below) provided in the forum only adjusted the column with the text-based input, while not the Y-scale column that I want to reduce in size. Attaching a screen shot so you understand.
I am using LS 2.73 and the default template at the moment.
Any help would be much appreciated!
Tried using this script:
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
// Identify this question
var thisQuestion = $('#question{QID}');
// Assign column-specific classes
$('table.subquestion-list tr', thisQuestion).each(function(i) {
$('> *:gt(0)', this).each(function(i){
$(this).addClass('column-'+(i+1));
$(this).attr('data-column', i+1);
});
});
// Resize the inputs
$('.column-1 input[type="text"]', thisQuestion).css('width', 'auto').attr('size', '10');
$('.column-2 input[type="text"]', thisQuestion).css('width', 'auto').attr('size', '5');
});
</script>
Hoping that someone may be able to help me with a basic adjustment to an array question.
Have looked for other similar topics on the forum, like this one:
www.limesurvey.org/forum/design-issues/1...array-text-questions
I am, in essence, trying to adjust the width of the first column. The solution/script (see below) provided in the forum only adjusted the column with the text-based input, while not the Y-scale column that I want to reduce in size. Attaching a screen shot so you understand.
I am using LS 2.73 and the default template at the moment.
Any help would be much appreciated!
Tried using this script:
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
// Identify this question
var thisQuestion = $('#question{QID}');
// Assign column-specific classes
$('table.subquestion-list tr', thisQuestion).each(function(i) {
$('> *:gt(0)', this).each(function(i){
$(this).addClass('column-'+(i+1));
$(this).attr('data-column', i+1);
});
});
// Resize the inputs
$('.column-1 input[type="text"]', thisQuestion).css('width', 'auto').attr('size', '10');
$('.column-2 input[type="text"]', thisQuestion).css('width', 'auto').attr('size', '5');
});
</script>
Attachments:
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12790
- Thank you received: 3940
6 years 1 day ago #166310
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Array: Adjust Y-scale width
Hi,
in my opinion it is sufficient to use this "out of the box" solution.
Use a question of type "multiple short text".
Display the next row only if there was something entered.
Set the width of label and input field with:
Edit / Advanced options:
See attached sample.
Best regards
Joffm
in my opinion it is sufficient to use this "out of the box" solution.
Use a question of type "multiple short text".
Display the next row only if there was something entered.
Set the width of label and input field with:
Edit / Advanced options:
See attached sample.
Best regards
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10634
- Thank you received: 3698
6 years 1 day ago #166326
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: Adjust Y-scale width
Array answer width -
manual.limesurvey.org/Question_type_-_Ar...h_.28answer_width.29
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.