Welcome, Guest
Username: Password: Remember me

TOPIC: Nested Surveys (or "sub-surveys")?

Nested Surveys (or "sub-surveys")? 3 years 1 month ago #58379

  • tacman1123
  • tacman1123's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 125
  • Karma: 1
Is there a way that I can have an indeterminate number of related surveys within a survey, like I can have a 0+ files uploaded?

For example, if I'm doing a family survey and I want to ask "What are the names, birthdates and birthplaces of each of your children", really what I want is a new survey that has a hidden field of the "parent" survey id.

Is there a way to do this?

This would also apply to something like "Work Experience" or "Education", where there would be the option to repeat the mini-survey, which would consist of dates and places, employers, school names, etc.

I'm guessing not, but that I could set it up as a different survey and somehow keep track of the survey or user id.

Thoughts?

Tac
The administrator has disabled public write access.

Re: Nested Surveys (or "sub-surveys")? 3 years 1 month ago #58384

  • holch
  • holch's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 2444
  • Thank you received: 254
  • Karma: 94
Well, I think you can do that. Let's see if this will serve you:

You would have to create the question for example about the family members and repeat it n times, n being the maximum number of repetition you'd expect.

So you create questions for name, birthdates and birthplaces and at the end you add a question "Would you like add another family member". The questions for the second family member would be shown/hidden depending on the answer to "would you like to add...".

That should work out quite well. It is some work, but it is the only solution I see that will work out of the box.
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Question Attributes | Workarounds

If you found this answer helpful and it saved you some time please consider a donation to the project to keep Limesurvey going!
The administrator has disabled public write access.

Re: Nested Surveys (or "sub-surveys")? 3 years 1 month ago #58389

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 3813
  • Thank you received: 683
  • Karma: 328
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.

Re: Nested Surveys (or "sub-surveys")? 3 years 1 month ago #58391

  • tacman1123
  • tacman1123's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 125
  • Karma: 1
Thanks, very interesting. How is the array stored? And created. I thought I had looked through all the options on creating something like this, but I had missed it. Can you point me to the documentation? It seems like exactly what I'm looking for.

Tac
The administrator has disabled public write access.

Re: Nested Surveys (or "sub-surveys")? 3 years 1 month ago #58412

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 3813
  • Thank you received: 683
  • Karma: 328
Can you point me to the documentation?
If you are referring to the workarounds, all documentation is on that page. The workarounds are applied to normal LimeSurvey questions - in the first case, an array text question.
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.

Re: Nested Surveys (or "sub-surveys")? 3 years 1 month ago #58422

  • tacman1123
  • tacman1123's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 125
  • Karma: 1
Actually, not the workaround, the "Array" structure for the answers. In order to use that workaround, what is the question type?
The administrator has disabled public write access.

Re: Nested Surveys (or "sub-surveys")? 3 years 1 month ago #58424

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 3813
  • Thank you received: 683
  • Karma: 328
This workaround uses the Array (Texts) question.
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.113 seconds
Donation Image