Welcome to the LimeSurvey Community Forum

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

Can I use conditions to determine how many rows in an array?

  • avimagic
  • avimagic's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 2 months ago #90644 by avimagic
I'm a newbie, and so far loving this software!

What I would like to do for my first survey is collect information about children in a particular family.

So the first question is, "How many children are in your family?" This is a simple dropdown in which all of the options are integers.

For the next question, I'd like it to be an array that collects specific information about each child (gender, age, etc.).

Can I set up a condition that tells the array to have exactly the number of rows specified in question 1?

Thanks!!!
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
11 years 2 months ago #90653 by tpartner
Unfortunately you cannot use conditions to hide/show sub-questions (array rows).

You could:

1) Use JavaScript to show the appropriate number of array row as the dropdown is changed.

2) Use separate questions for each child and hide/show them with conditions. You could apply a little CSS to make the separate questions appear to be one.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose