Welcome to the LimeSurvey Community Forum

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

Combine multi-row short text with other fields in array

  • stuwinter
  • stuwinter's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 1 month ago #117126 by stuwinter
Hello
Based on the following historical topic:
www.limesurvey.org/fr/forum/can-i-do-thi...w--my-solution#89012

I would like to display a multi-row short-text next to another question/answer combination. The previous example works well but not in the following scenario. If you adjust advanced setttings for the multiple-short-text box and add any value for Display Rows then try to merge arrays the input boxes are not displaying correctly. Tried with Display Rows = 1 and 3. If not set then all is well

In the attached survey (modified version of previous example):
Q1 - is with a Input Box Width = 100 set and this works
Q2 - is with Input Box = 100 and Display Rows = 3. This does not display correctly!!! Content is in the page but not displayed
Q3 - is a copy of Q2 Comments to demonstrate the code works and what I would like to appear in the array.

Suspect this is either JS and/or CSS but I am sorry to say I have tried and need a pointer in the right direction to resolve (if actually possible)

Hope this makes sense.
Stuart
The topic has been locked.
  • stuwinter
  • stuwinter's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 1 month ago #117135 by stuwinter
From trial and error added to the JS after ('input.text'..... line:

$('textarea.textarea', nextQuestion).each(function(i){
$('.subquestions-list tbody tr:eq('+i+') td:last', thisQuestion).append(this);
});


When "Display Rows" is not set the HTML is an "input" type, when "Display Rows" is set then HTML is a "textarea"':

<input class="text " type="text" size="100" name="777621X14X2794" id="answer777621X14X2794" value="" onkeyup="checkconditions(this.value, this.name, this.type);" />

<textarea class="textarea " name="777621X14X3762" id="answer777621X14X3762" rows="3" cols="100" onkeyup="checkconditions(this.value, this.name, this.type);"></textarea>
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose