Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Array: Adjust Y-scale width

  • pippipelikan
  • pippipelikan's Avatar Topic Author
  • Offline
  • New Member
  • New Member
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>
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 1 day ago #166310 by Joffm
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.

File Attachment:

File Name: limesurvey...1191.lss
File Size:18 KB


Best regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 1 day ago #166326 by tpartner
Replied by tpartner on topic Array: Adjust Y-scale width

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose