Welcome to the LimeSurvey Community Forum

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

Subheadings and other option in Numbers Array (with checkboxes)

  • KatMey99
  • KatMey99's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 months 2 weeks ago #251149 by KatMey99
Please help us help you and fill where relevant:
Your LimeSurvey version: 3.28.56
Own server or LimeSurvey hosting: 
Survey theme/template: oecd.12
==================
Hi there, 

I want to design an array number question with check boxes with several different subheadings to categorise the answer options in the rows (see picture below). I have come across several forum entries which provide codes to insert subheadings in array questions, however, they don't seem to work for number arrays. I would be very grateful for your guidance on how to implement this in a numbers array question format!

Complicating things a bit further, I would also like to include an "other" option in each of the categories (i.e. in the last row of each category, prior to the next subheading). I have figured out (thanks to previous entries!!) how to add an "other" option in the last row of a numbers array, but I am not sure how I would insert it in each category.

I know this is a quite nuanced question and trust me, I have considered several workarounds (e.g. having multiple questions in one question category....) but none of them make sense in the specific context of my questionnaire. 

Any ideas are very much appreciated - thank you so much for your help!!!

Please Log in to join the conversation.

  • KatMey99
  • KatMey99's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 months 2 weeks ago #251150 by KatMey99
(looks like the picture didn't upload)

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 months 2 weeks ago #251152 by Joffm
Hi, 
I could show this
 

and the sample survey
 

File Attachment:

File Name: limesurvey...3717.lss
File Size:34 KB


Best regards
Joffm
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: KatMey99

Please Log in to join the conversation.

  • KatMey99
  • KatMey99's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 months 1 week ago #251167 by KatMey99
This is just what I needed, thank you so much for sharing this!

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 months 1 week ago #251217 by holch
Thanks for sharing, Joffm. Just tested it and it seems not to work for LS 6. I'll need to have a look at this and see how to make this work for LS6.

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

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 months 1 week ago - 6 months 1 week ago #251227 by Joffm
Yes, it does not.
When I change these lines of code
Code:
        // Move the hidden text inputs into the array
            $('th.answertext:eq(7)', thisQuestion).append($('input[type="text"]', nextQuestions[0])).closest('tr').addClass('otherRow');
            $('th.answertext:eq(11)', thisQuestion).append($('input[type="text"]', nextQuestions[1])).closest('tr').addClass('otherRow');
            $('th.answertext:eq(14)', thisQuestion).append($('input[type="text"]', nextQuestions[2])).closest('tr').addClass('otherRow');

it works, but I have no clue why the first "Other" is in row 7. I just tried.

 
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 6 months 1 week ago by Joffm.

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose