limit survey access based on URL parameter

More
2 weeks 4 days ago #169518 by adieball
adieball created the topic: limit survey access based on URL parameter
Hi

we send out emails with a link to the survey from a ticket system and add the ticket id into the URL.

Can I:
  • prevent accessing a survey when there already is a submitted survey with that given ticketID
  • prevent access to the survey when the ticketID in the URL is empty

thanks

Please Log in or Create an account to join the conversation.

More
2 weeks 4 days ago #169519 by holch
holch replied the topic: limit survey access based on URL parameter
You can use the token system of Limesurvey. You either create tokens and use them as ticketID or you use the ticketID as token. In any way, you need to create tokens before you can send the survey.

So if tokens are used for the survey, LS checks if the token exists (if there is no token you won't be able to participate in the survey) and if the token exists, it checks how many "uses" are left. Default is 1 use per token, but you could increase this. In your case 1 use would be the correct number and once someone accessed the survey with a specific token and completed it the uses left go down to 0, which means you can't use this token link anymore.

Now you just need to find a way to create the tokens correctly (probably the easiest way is to create the tokens based on the ticket). You might be able to do this via the LS API. But I am no expert on this.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in or Create an account to join the conversation.

More
2 weeks 3 days ago #169533 by tpartner
tpartner replied the topic: limit survey access based on URL parameter
You can create the tokens via the API. Here is a PHP example - www.limesurvey.org/forum/can-i-do-this-w...-fly?start=15#158184

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in or Create an account to join the conversation.

More
2 weeks 2 days ago #169574 by adieball
adieball replied the topic: limit survey access based on URL parameter
great, thank you. will check if we can get that to work.

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!