Welcome, Guest
Username: Password: Remember me

TOPIC: Iterate some questions

Iterate some questions 3 years 5 months ago #57811

  • rafaom
  • rafaom's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 6
  • Karma: 0
I need to apply a questionnaire about families with several members. I'll ask questions to the members but some data will be asked about the family too. So, I have to ask those questions about the family just once, but then ask the ones about the members one by one. How can I repeat just some questions of the questionnaire and keep the answers of the other questions?
The administrator has disabled public write access.

Re: Iterate some questions 3 years 5 months ago #57823

  • tpartner
  • tpartner's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 4141
  • Thank you received: 767
  • Karma: 349
Create several groups off the member questions. Ask how many family members the respondent has and then use conditions to show the appropriate number of member groups.
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: Iterate some questions 3 years 5 months ago #57845

  • rafaom
  • rafaom's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 6
  • Karma: 0
tpartner wrote:
Create several groups off the member questions. Ask how many family members the respondent has and then use conditions to show the appropriate number of member groups.

Sorry, I didn't understand. Conditions only work for hiding/showing individual questions (or am I wrong?), but I don't know how to use them to show/hide question groups. Could you be more specific, please? Thanks for yor answer.
The administrator has disabled public write access.

Re: Iterate some questions 3 years 5 months ago #57846

  • tpartner
  • tpartner's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 4141
  • Thank you received: 767
  • Karma: 349
If all questions in a group are hidden by conditions, the group will be hidden.
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.
The following user(s) said Thank You: rafaom, jonsen

Re: Iterate some questions 3 years 5 months ago #57848

  • rafaom
  • rafaom's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 6
  • Karma: 0
Ok, I understand. But I think this is not actually what I need. I mean, I need not only hide some questions, but keep some answers (v.gr. address, phone number, etc.) that are common to all family members, and repeat a group of questions as much as family members there are (name, age, sex, etc).
The administrator has disabled public write access.

Re: Iterate some questions 3 years 5 months ago #57852

  • tpartner
  • tpartner's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 4141
  • Thank you received: 767
  • Karma: 349
Like this:

GROUP 1
- address
- phone number
- email
- other family specific question
- number of family members

GROUP 2
- relationship
- name
- age
- gender
- other family member specific question

GROUP 3
- relationship
- name
- age
- gender
- other family member specific question

GROUP 4
- relationship
- name
- age
- gender
- other family member specific question

GROUP 5...
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.
The following user(s) said Thank You: rafaom, jonsen

Re: Iterate some questions 3 years 5 months ago #57857

  • rafaom
  • rafaom's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 6
  • Karma: 0
Thanks a lot! This is the answer I was looking for.
The administrator has disabled public write access.

Re: Iterate some questions 3 years 4 months ago #59558

  • jonsen
  • jonsen's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 73
  • Thank you received: 6
  • Karma: 1
I also thank you for this!

I have two questions extending rafaom's:

1) There can be up to a hundred people in my example (a single person reporting about a larger group of people). Is there a way to automise this? Otherwise I would just copy the groups in XML (btw: is there a better way to make a hundred identic groups?), but that would be just ugly.

2) To identify each individual, their name shall show up in the question. To do that, I would like to have a variable in the id of a replacement field. For example: If the current person is person 36, can I show {INSERTANS:92731X2016X14971name_first36}? The names are all entered in one question in the group before.

I do know quite a bit of php, and I would also like to contribute to LimeSurvey. So if it takes some programming to accomplish this, I would be happy to do so (if I am able).

Greets
jonsen

[EDIT] regarding question 2: Could I replace the question div (<div id="questionXYZ">) empty and just fill it with javascript?

[EDIT 2] 3) As the number of people can be as low as _one_, can I only ask for one name in this case, and for 17 if there are 17?

Example:
Question 1: How many doctoral candidates do you have in your department?
Question 2: What are the names of the candidates?
Question 3: Has {person_XYZ_name_first} published any article in a journal regarding the field of physics?


I AM WILLING TO MOVE ANY OF THESE QUESTIONS TO A NEW TOPIC, please tell me if you think that's neccessary.
Last Edit: 3 years 4 months ago by jonsen. Reason: adding queries
The administrator has disabled public write access.

Re: Iterate some questions 3 years 4 months ago #59608

  • jonsen
  • jonsen's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 73
  • Thank you received: 6
  • Karma: 1
Sorry if I extended this topic a bit too far. I would be very glad to have a solution to ANY of the three questions, or JUST A HINT of where to look. I have been browsing through the forum and related sites, but could not find what I needed...

Nevertheless: Thanks everyone, this forum is great!!
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.137 seconds
Donation Image