Welcome to the LimeSurvey Community Forum

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

Adjust cell height of Array(Text) cell

  • tina.ilek
  • tina.ilek's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 5 months ago #221376 by tina.ilek
Adjust cell height of Array(Text) cell was created by tina.ilek
Hi community,

for a delphi study I need the cell (subquestion) height to be bigger than in standard. The cell can hold 1000 signs and they should all be shows when the participant is writing.
Is that possible?
In the same way, I want to adjust the width of the 2 subquestion columns (first ike 25%, second (the one where I want to adjust height) 75%).

Any idea?

All the best,
Tina 
 
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 5 months ago #221379 by Joffm
Replied by Joffm on topic Adjust cell height of Array(Text) cell
To answer your second question first.
Insert this in your question text (source code mode)
Code:
<script type="text/javascript" charset="utf-8">
  $(document).on('ready pjax:scriptcomplete',function(){
    var thisQuestion = $('#question{QID}');
    // Add a question class
    thisQuestion.addClass('custom-array');
 
    // Column-specific classes
    $('table.subquestion-list tr', thisQuestion).each(function(i) {
      $('th, td', this).each(function(i) {
        $(this).addClass('column-'+i);
      });
    });
  });
</script>
Code:
<style type="text/css">.custom-array table.subquestion-list col {
    width: auto !important;
  }
  .custom-array table.subquestion-list thead .column-0 {  width: 20%; }
  .custom-array table.subquestion-list thead .column-1 {  width: 20%; }
  .custom-array table.subquestion-list thead .column-2 {  width: 60%; }
</style>

 


And your first question?
Yes, you CAN do that, but
Insert this into the question text (source code mode)
Code:
<script type="text/javascript" charset="utf-8">
$(document).on('ready pjax:scriptcomplete',function(){
  var thisQuestion = $('#question{QID}');
  $('input[name="{SGQ}Y001_X002"]').replaceWith('<textarea id="{SGQ}Y001_X002" name="{SGQ}Y001_X002"   cols="60" rows="5"></textarea>');
});
</script>
You see that the codes of x-axis and y-axis are hardcoded here and that I used "Y001", "Y002" for the y-axis and "X001, "X002",... for the x-axis.

 

I don't know how many "opportunities" there will be.
In my opinion you'd better should use a different layout, e.g. a combination of short text and long text


Joffm
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 5 months ago #221392 by holch
Replied by holch on topic Adjust cell height of Array(Text) cell
Do we know what the limit for those text boxes is in terms of letters? Can they save 1000? Or just 256?

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 5 months ago #221397 by Joffm
Replied by Joffm on topic Adjust cell height of Array(Text) cell
It is implemented as "text" in the database.
So we have 64K.

Tested with a 2500 characters "lorem ipsum"
 

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: holch
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose