Check out the LimeSurvey source code on GitHub!

Single access user ID

More
4 years 1 month ago #91074 by rvenkat
I want to create a survey where each potential respondent will have an id number that they will enter (9 digits or less). I don't need to validate the id. But I want to prevent reuse of the same id number. If a user completes the survey using one id number, he or she can complete the same survey again later using a different id but not the old id.

ID numbers are not stored in a database. The id numbers are not known in advance to the researcher, so it is not possible to use tokens.

The first question in the survey will ask them to enter the id number. If the id has not been previously used and the id format is correct, they will be allowed to proceed further. Otherwise, they will be sent to an end page with a "sorry" message.

Has anyone attempted anything like this? Can someone give me some ideas on how to do this?

Thanks very much.

Please Log in to join the conversation.

More
4 years 1 month ago #91103 by tpartner
You cannot directly access answers from previous surveys.

You will need to make an AJAX call to a remote PHP script that tests the input id against previous answers. If a match is found, you can use JavaScript to toggle a hidden radio question and apply a quota of 0 to that question.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: rvenkat

Please Log in to join the conversation.

More
4 years 3 weeks ago #91747 by rvenkat
Thanks very much.

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form