Welcome, Guest
Username: Password: Remember me

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

Can I use conditions to determine how many rows in an array? 1 year 6 months ago #90644

  • avimagic
  • avimagic's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 1
  • Karma: 0
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 administrator has disabled public write access.

Re: Can I use conditions to determine how many rows in an array? 1 year 6 months ago #90653

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4072
  • Thank you received: 748
  • Karma: 341
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.112 seconds
Donation Image