Welcome to the LimeSurvey Community Forum

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

How to end Multiple question with the same End?

  • RonPhil
  • RonPhil's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 9 months ago - 8 years 9 months ago #122587 by RonPhil
How can i end multiple questions with the same end like the following code:

Like a Matrix question, where I can set the rowspan to for example 3, for one column:
I use ...
I prefer to use ...... a mobile Phone
People at my workplace use...

it would be great if you can help me, I am very new in Lime Survey.
Thanks a lot in advance!
RonPhil
Last edit: 8 years 9 months ago by RonPhil.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 9 months ago #122622 by tpartner
Sorry, I don't understand what you want to do. Can you give a graphic representation or a mockup?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • RonPhil
  • RonPhil's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 9 months ago #122627 by RonPhil
Hi tpartner,

attached you find an excel graphic, how my Matrix question should look like. The part that I dont know how to design is marked in red. It is the second column of the matrix which should have rowspan = 3.
Thank you for your answer, I hope the graphic helps to clarify my problem?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 9 months ago - 8 years 9 months ago #122628 by tpartner
Placing a script like this in the question source should do the trick. For demonstration purposes, I have inserted two new cells.

Code:
<script type="text/javascript" charset="utf-8">    
  $(document).ready(function() {    
 
    // Identify this question
    var thisQuestion = $('#question{QID}');
 
    // Insert the new table cells
    $('.subquestions-list thead td:eq(0)', thisQuestion).after('<td />');
    $('th.answertext:eq(0)', thisQuestion).after('<td class="inserted-cell" rowspan=3">...a mobile Phone</td>');
    $('th.answertext:eq(3)', thisQuestion).after('<td class="inserted-cell" rowspan=3">...a Pager</td>');
 
    // Remove the column widths imposed by LimeSurvey
    $('col', thisQuestion).removeAttr('width');
    $('.subquestions-list', thisQuestion).css('width', '100%');
 
    });
</script>


Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
Last edit: 8 years 9 months ago by tpartner.
The following user(s) said Thank You: RonPhil
The topic has been locked.
  • RonPhil
  • RonPhil's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 9 months ago #122642 by RonPhil
That's exactly what i wanted. Thanks a lot! :)
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose