Welcome to the LimeSurvey Community Forum

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

Using previous Array question responses to set following Array subquestions

  • StuTheQ
  • StuTheQ's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 9 months ago #96397 by StuTheQ
Hi again Tony,

Thanks for the useful replies (sorry to pester you :angry: ; it's just that I always like to understand stuff, if possible! But I know that's not what the forum is for... :blush: ).

It doesn't really supersede but is an alternative. If you use the conditions designer, a relevance rule will automatically be generated and inserted for you. Alternatively, you can write your own relevance rule with far more flexibility than the conditions designer allows. See manual.limesurvey.org/Expression_Ma...ons_and_Relevance.3F.

Yes, I'd read that; the 'best practice' approach, perhaps? (no reply needed!)

What is the exact role of the qHidden toggle function?
I'm not sure I understand the question. The handleHiddenInput() function checks or unchecks boxes in the hidden question as you click radios in the first array. The array filter then shows or hides the corresponding rows in the second array.

Yes, I'd understood that function from the original workaround. It was just the "new" (?) 'toggle' function script which intrigued me (some kind of 'reset' function between iterations?) (no reply needed!)

The 'Fix up the q2 row background colours' script ensures that the subquestion rows in Q2 are alternate colours, regardless of the subquestion rows checked in Q1?
Correct. When rows are shown or hidden, it just removes all of the array1 and array2 classes from the rows and then reapplies them sequentially to the visible rows.

Cool!! :)

Guess it's about time that I enrolled for JavaScript evening classes somewhere!

Thanks, Tony.

Regards,

Stu
The topic has been locked.
More
10 years 8 months ago #97476 by arielmosto
Dear Tony:

How are you?

We are trying to use this java code in limesurvey 2.00+ build 130526, where the q1 is an array number checkbox and q2 is a text array.

But it doesn't work.

Is it possible that this script doesn't work with this type of question?

Thanks and regards Ariel
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose