Welcome to the LimeSurvey Community Forum

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

Adding survey participant via attributes in URL

  • alextj
  • alextj's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 4 months ago #244365 by alextj
Please help us help you and fill where relevant:
Your LimeSurvey version: [see right hand bottom of your LimeSurvey admin screen]
Own server or LimeSurvey hosting:
Survey theme/template:
==================
Is it possible to add survey participants via the URL?

I do something similar with answering survey questions, by pre-filling the fields via attributes in the URL, which is great, but can this also be done for adding participants?

I've tried the same syntax ..index.php/admin/tokens/sa/addnew/surveyid/xxx?firstname=me but it's not working.

Any ideas?
Thanks

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 4 months ago #244372 by holch
No, afaik survey participants can not be added to a survey via URL.

With the URL you can pass on data to be saved in the response table, but you can't create participants in the participant table.

You would need to create the respondentsvia the API, I guess.

Maybe, but just maybe, you could have a look at the option "allow public registration". Maybe it is possible to prefill the registration fields via link, but I don't think so.

www.limesurvey.org/manual/Participant_se..._public_registration

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 4 months ago - 1 year 4 months ago #244373 by holch
But if you want to add the participants directly to the survey via the URL, do you really need the participants feature? I think this is only relevant when you want to have a defined group of participants.

If you would add them via URL, why not skip the whole "participant table" thing and just add the firstname via URL into a hidden question? At the end of the day you don't have a fixed participant list anyway, if I understand you correctly. Just treat the participant data as responses.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Last edit: 1 year 4 months ago by holch.

Please Log in to join the conversation.

  • alextj
  • alextj's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 4 months ago #244375 by alextj
Thanks for the replies.

I'm trying to export the data we already have in Excel into the questionnaire participants table, rather than manually entering email, name, etc..

It's for an individual participant, so it seemed a lot of clicking to export as csv and import it into Limesurvey that way for 1 person.

I'm using the participants feature as there is a specific set of participants, who need an invitation email.

All ideas welcome, and thanks!

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 4 months ago #244377 by holch
You can always include a new participant manually via the Limesurvey interface, without a CSV export and import. For sure not more work than including the participant data into the URL.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Please Log in to join the conversation.

  • alextj
  • alextj's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 4 months ago #244378 by alextj
Yes I'm currently doing it manually, copying and pasting over each value by value.

But with the URL method for pre-filling fields I just need 1 click - Excel can embed all the data automatically inside the URL and importing it over that way, so saving a LOT of clicking around.

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 4 months ago - 1 year 4 months ago #244381 by holch
Well, you probably will need to find a different solution, because I don't think you can add a participant via the survey URL.

What I could think of is the following scenario:

1. Create a certain amount of dummy users in the participant database with fake data in addition to your "normal" users
2. Add hidden questions for the participant data in the survey
3. Send the participant data via token URL of a dummy participant into these hidden questions and save them
4. Use the plugin "UpdateTokenByResponse" to write the data back into the participant table.

Of course, this way the additional hidden questions will be empty for all "normal" participants and only have data for those that are included via URL. So you need to see what happens and if the participant data is also updated for those, which would be counter productive as you would overwrite your participant data with empty data. In this case you would have to write the token information also into these cases e.g. using the default answers to pipe the data from the token table.

Just an idea, but depending on how often the case of addtional users happen, it still might be easier to just "hammer" this data in manually, rather than go down this route with all this. but of course, only you can decide what at the end is more work or more tedious, as we don't know the exact circumstances, what respondent data needs to be included, if there are a lot of custom attributes, etc.

But you always have the option to include respondents via the api, as I mentioned before. Might be an option to look into.

Oh, here the link to the Plugin: gitlab.com/SondagesPro/TokenManagement/updateTokenByResponse

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Last edit: 1 year 4 months ago by holch.
The following user(s) said Thank You: alextj

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 4 months ago #244382 by holch
One other thing:

It's for an individual participant, so it seemed a lot of clicking to export as csv and import it into Limesurvey that way for 1 person.


As far as i know, you don't necessarily need to export the CSV, add a respondent and then import it again.

As far as I know you can save one step here and you could just upload a CSV (in the right format of course, but you have that anyway, because you should have the original CSV saved) and just update the participant table with this one respondent. Might save you at least some steps and as far as I know should work. You might want to make that test.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Please Log in to join the conversation.

  • alextj
  • alextj's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 4 months ago #244385 by alextj

1. Create a certain amount of dummy users in the participant database with fake data in addition to your "normal" users
2. Add hidden questions for the participant data in the survey
3. Send the participant data via token URL of a dummy participant into these hidden questions and save them
4. Use the plugin "UpdateTokenByResponse" to write the data back into the participant table.

But you always have the option to include respondents via the api, as I mentioned before. Might be an option to look into.

 

That sounds like a clever approach - I'm not an expert coder so the api might be beyond me, but I'll check out that plugin.

Please Log in to join the conversation.

  • alextj
  • alextj's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 4 months ago #244386 by alextj

One other thing:

It's for an individual participant, so it seemed a lot of clicking to export as csv and import it into Limesurvey that way for 1 person.


As far as i know, you don't necessarily need to export the CSV, add a respondent and then import it again.
 

The export refers to the Excel, to export the data in csv to then import to Limesurvey.

However, reading this I had an idea that might work well. I could try to get ChatGPT to write VBA to create and export the csv file for me, so that would cut down the steps, and then it's just a matter of selecting the file to import and off it goes.

Is there also a way of skipping the generate tokens part and going straight to sending invites? (I never understood why there are 4-5 extra redundant clicks and screens in this step between importing and emailing.)

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 4 months ago #244388 by holch

The export refers to the Excel, to export the data in csv to then import to Limesurvey.


Ahh, ok. But anyway, Excel is usually not the best tool to work with CSV for Limesurvey anyway. The standard separator in Excel is different to the standard separater as a standard in CSV. One is "," the other is ";".

Is there also a way of skipping the generate tokens part and going straight to sending invites? (I never understood why there are 4-5 extra redundant clicks and screens in this step between importing and emailing.)


If you import your own tokens you shouldn't have to generate tokens. If you don't have tokens in the imported CSV, then you need to create them at some point.

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: alextj

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose