Welcome to the LimeSurvey Community Forum

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

Adding a header to a single scale matrix

  • VanEyck
  • VanEyck's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 4 weeks ago #117460 by VanEyck
Hi there, this is my first active intervention in this forum. I'm new at lime survey and I'm still trying to fix out how this all thing goes about.

I'm having inconveniences customizing a single scale matrix. The scale goes from 1 to 10 and I was wondering if there was a way to add an extra row above this scale. I attached the example of how I would like it to be.

If this is not possible, I wonder if there's any way to edit margins at the inside of cells from a row.

I know you all are experts at this subject, please be kind and take notice this is my first attempt with lime survey.

Thank you in advance

Lucy
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 3 weeks ago - 9 years 3 weeks ago #117500 by tpartner
Replied by tpartner on topic Adding a header to a single scale matrix
Set up your survey to use JavaScript and place the following script in the source of the question:

Code:
<script type="text/javascript" charset="utf-8">  
  $(document).ready(function() {
 
    // Identify this question
    var thisQuestion = $('#question{QID}');
 
    // Insert a new row in the table head
    $('table.subquestions-list thead', thisQuestion).prepend('<tr>\
    <td></td>\
    <th colspan="2">Muy insatisfactorio</th>\
    <th colspan="3">Insatisfactorio</th>\
    <th colspan="3">Satisfactorio</th>\
    <th colspan="2">Muy satisfactorio</th>\
    </tr>');
    });
</script>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 9 years 3 weeks ago by tpartner.
The following user(s) said Thank You: VanEyck
The topic has been locked.
  • VanEyck
  • VanEyck's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 3 weeks ago #117645 by VanEyck
Replied by VanEyck on topic Adding a header to a single scale matrix
Thank you soooo much Tony!!! Exactly what I needed!!! MUCH APPRECIATED!
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose