Welcome to the LimeSurvey Community Forum

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

Combining Array Questions

  • tixeon
  • tixeon's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
9 years 1 month ago #116399 by tixeon
Combining Array Questions was created by tixeon
I have 4 single row array questions that I want to combine under one question heading. (they all have different answer codes - so I just want to hide the question blocks).

I can get the first 2 to work, but not the last 2. I am obviously missing something in the script.

Please help.

File Attachment:

File Name: Combining_...ions.lsg
File Size:15 KB
The topic has been locked.
More
9 years 1 month ago #116400 by Bigred01
Replied by Bigred01 on topic Combining Array Questions
You can use the following script to put all the array tables together in the first array question and hide the original array questions that no longer have tables. (hopefully this is what you were trying to do)

I would move the question text to the first array question and delete the text display.
Code:
<script type="text/javascript">    
$(document).ready(function () {
    $('.array-flexible-row .subquestions-list').not('.array-flexible-row .subquestions-list:eq(0)').insertAfter('.array-flexible-row .subquestions-list:eq(0)');
    $('.array-flexible-row').not('.array-flexible-row:eq(0)').hide();
});
</script>
The following user(s) said Thank You: tpartner, tixeon
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose