Welcome to the LimeSurvey Community Forum

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

How to programmatically profile multiple-answers with names of participants

  • digitaldust
  • digitaldust's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 5 months ago #159166 by digitaldust
I have a design issue regarding a network survey that I am trying to build. In this scenario, what you do is ask participants some questions and they will have to pick the names of other participans as answers.

I think I can use a multiple-answers question to accomplish this, but I have currently no idea how to prefill the sub-questions array with the names of the survey participants.

Best would be to have the id of each participant be assigned as the code for that answer.

Thanks for pointers in the right direction
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 5 months ago #159219 by tpartner

...I have currently no idea how to prefill the sub-questions array with the names of the survey participants.

There is no way to directly access the details of other tokens from a survey. If you need these names dynamically populated, you will have to make an AJAX call to a remote PHP script that queries the database.

Best would be to have the id of each participant be assigned as the code for that answer.

You can not dynamically add/modify sub-question codes - they must be defined before survey activation.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • digitaldust
  • digitaldust's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 5 months ago #159220 by digitaldust
I am afraid my point is not clearly stated. Say I have this list of participants:

Mike
Luke
John

and I ask this question:

Whom do you turned to within the last month for general guidance or referrals to other sources of information?
- Mike
- Luke
- John

of course I have the list of participants since the beginning, all I want is to plug it as possible answers.

If that was clear and your reply still holds, than thank you very much for your time!
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose