- Posts: 18
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Automatically adding participants to a survey
- labean0103
- Topic Author
- Offline
- New Member
Less
More
1 year 4 months ago #236296
by labean0103
Automatically adding participants to a survey was created by labean0103
LimeSurvey version: 3.25.18+210316
==================
Hello!
I would like to know if it is possible to automatically create participants info based on the user input/answers to another survey? So, basically it would look like there is a survey, and when a person opens that survey, puts name and other info into that survey and submits it, that automatically creates a participant into another survey with the name information given by that user. I am good with programming, but not a pro, so I am a little bit confused about how I could do that and is it even possible, so any information would be useful, thanks!
==================
Hello!
I would like to know if it is possible to automatically create participants info based on the user input/answers to another survey? So, basically it would look like there is a survey, and when a person opens that survey, puts name and other info into that survey and submits it, that automatically creates a participant into another survey with the name information given by that user. I am good with programming, but not a pro, so I am a little bit confused about how I could do that and is it even possible, so any information would be useful, thanks!
Please Log in to join the conversation.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11660
- Thank you received: 2742
1 year 4 months ago #236297
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Automatically adding participants to a survey
I see two options for you:
Allow public registration for a closed survey with tokens:
manual.limesurvey.org/Participant_settin..._public_registration
Or you create your own script that generates users with a token via the API:
manual.limesurvey.org/RemoteControl_2_API
Allow public registration for a closed survey with tokens:
manual.limesurvey.org/Participant_settin..._public_registration
Or you create your own script that generates users with a token via the API:
manual.limesurvey.org/RemoteControl_2_API
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The following user(s) said Thank You: labean0103
Please Log in to join the conversation.
- tammo
- Offline
- Official LimeSurvey Partner
Less
More
- Posts: 967
- Thank you received: 220
1 year 4 months ago #236299
by tammo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Replied by tammo on topic Automatically adding participants to a survey
You could do the following: if and when the respondent answers the questions in a way that will qualify him or her for a follow up survey, you can generate a random code (save that in Survey 1) and use that random code as a pass over variable to the following survey (Survey 2, URL in the end message, load immediately). If not, the end message can be: "Thank you" of a URL to any web page.
Tammo
Tammo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The following user(s) said Thank You: labean0103
Please Log in to join the conversation.
- labean0103
- Topic Author
- Offline
- New Member
Less
More
- Posts: 18
- Thank you received: 0
1 year 4 months ago #236300
by labean0103
Replied by labean0103 on topic Automatically adding participants to a survey
Okay, thank you! Yeah, I've been reading that manual about RemoteControl API and I just started learning about APIs and how to use them so I guess I will have to research that first and then try using that API.
About that first option
About that first option
By "visitor" they mean just a person visiting the survey's page? Meaning that there will be created some input fields for a visitor's name/email etc. before the actual survey? It sounds interesting, but it doesn't quite fit my idea:( In the sense that I would like a user to first go to a page, fill in user's info and then choose a survey that they want to do and then they get redirected right to that exact survey already having an assigned token. But for now I was just thinking about how to transfer user input into participant list of the survey that the user has chosen. It's quite complicated, but thank you for the answer anyway!The "Yes" setting will allow a visitor to register his name and email address.
Please Log in to join the conversation.
- labean0103
- Topic Author
- Offline
- New Member
Less
More
- Posts: 18
- Thank you received: 0
1 year 4 months ago #236301
by labean0103
Replied by labean0103 on topic Automatically adding participants to a survey
Hey, thank you for the answer! Well, the thing is that I want a user to choose what survey they want to do and then get redirected to that survey while those user input information gets also redirected into that chosen survey's participant list! I wish it was that simple:)
Please Log in to join the conversation.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12940
- Thank you received: 3979
1 year 4 months ago - 1 year 4 months ago #236302
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Automatically adding participants to a survey
Hi,
I do not quite understand why you want to add the respondent data to a participant list.
If you do only this you have no link between this list and the data of the survey.
What you have to do:
But all this is not necessary with @tammo's solution.
You have the participant's data in survey 1, and you can merge them with the selected survey 2 by the "magic number" or you transfer them to survey 2 as parameter of the url.
The only difference is: in the first case you use a closed survey, otherwise an open survey.
I really do not understand, why you hesitate to try this.
Joffm
I do not quite understand why you want to add the respondent data to a participant list.
If you do only this you have no link between this list and the data of the survey.
What you have to do:
- In survey 1 capture some data
- Do an ajax call to call a script (in any programming language that suits you, php python, java,...) that uses the API to enter this respondent to the participant table of the selected survey 2 and generate a token
- Return this token to survey 1
- In the end-url of survey 1 redirect to the selected survey 2 with the token of this participant.
A simple nested IF, but better to generate the end-url in a question of type equation before.
But all this is not necessary with @tammo's solution.
You have the participant's data in survey 1, and you can merge them with the selected survey 2 by the "magic number" or you transfer them to survey 2 as parameter of the url.
The only difference is: in the first case you use a closed survey, otherwise an open survey.
I really do not understand, why you hesitate to try this.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 1 year 4 months ago by Joffm.
Please Log in to join the conversation.
- labean0103
- Topic Author
- Offline
- New Member
Less
More
- Posts: 18
- Thank you received: 0
1 year 4 months ago - 1 year 4 months ago #236312
by labean0103
Replied by labean0103 on topic Automatically adding participants to a survey
Hey, I've been trying out the first solution with public registration, and the problem I have is that no email is sent when user submits info including the email address. Do I have to change smth in the settings for user to get the email invite link or what is the case?
Do I have to manually send the invitation links?
Do I have to manually send the invitation links?
Last edit: 1 year 4 months ago by labean0103.
Please Log in to join the conversation.
- labean0103
- Topic Author
- Offline
- New Member
Less
More
- Posts: 18
- Thank you received: 0
1 year 4 months ago #236313
by labean0103
Replied by labean0103 on topic Automatically adding participants to a survey
Hey, thank you for the answer. I was implying this kind of system: a user goes to an "application" site (LimeSurvey or not), there they enter their name info and email and choose what survey(s) they want to complete. Then, they get redirected to the chosen survey(s) where a token (for all the surveys the user has chosen) is generated in the background and is put into participants list of those surveys and user is automatically redirected and logged in into that chosen survey with already assigned token and it applies to all the surveys the user has chosen.
I wanted to explain the system a bit more to provide a clear understanding of what I mean by my question. I am a bit lost in all the options in LimeSurvey right now related to my idea and I am trying to work everything out, thank you for your solution.
I wanted to explain the system a bit more to provide a clear understanding of what I mean by my question. I am a bit lost in all the options in LimeSurvey right now related to my idea and I am trying to work everything out, thank you for your solution.
Please Log in to join the conversation.
- bismark
- Offline
- Senior Member
Less
More
- Posts: 70
- Thank you received: 15
1 year 4 months ago #236314
by bismark
Replied by bismark on topic Automatically adding participants to a survey
If you are good in programming php you can solve your problem with a LimeSurvey Plugin using the event system.
afterSurveyComplete is your starting point
manual.limesurvey.org/AfterSurveyComplete
In your event handler you can fetch the response by the given responseId. Then create a token based on response data.
afterSurveyComplete is your starting point
manual.limesurvey.org/AfterSurveyComplete
In your event handler you can fetch the response by the given responseId. Then create a token based on response data.
Please Log in to join the conversation.
- labean0103
- Topic Author
- Offline
- New Member
Less
More
- Posts: 18
- Thank you received: 0
1 year 4 months ago #236317
by labean0103
Replied by labean0103 on topic Automatically adding participants to a survey
Thank you! I'm okay with programming PHP but I'm having hard time using programming with LimeSurvey. This may be a stupid question, but where for example should I put all the code? In that link there is an example ShowResponse and I couldn't understand where they put this code :')
Please Log in to join the conversation.
- bismark
- Offline
- Senior Member
Less
More
- Posts: 70
- Thank you received: 15
1 year 4 months ago #236318
by bismark
Replied by bismark on topic Automatically adding participants to a survey
maybe this helps:
dev.to/t/limesurvey
dev.to/t/limesurvey
Please Log in to join the conversation.
- labean0103
- Topic Author
- Offline
- New Member
Less
More
- Posts: 18
- Thank you received: 0
1 year 4 months ago #236319
by labean0103
Replied by labean0103 on topic Automatically adding participants to a survey
Thank you lots! It's hard to find info about coding inside of LimeSurvey (for beginners) for some reason
Please Log in to join the conversation.