Disallow submit if hidden value matches

0
it 32 Rep.

Hi,

I want to prevent survey takers from submitting multiple responses to the same survey. IP prevention and cookie based prevention are not good enough since both of them are pretty easy to bypass.

So I came up on idea to automatically add a hidden value to the survey which will somehow (hopefully) stop people in case this value is already in the response results.

For example – I send a survey link with url variable ?name=123 and then I add hidden value with this url parameter which is shown in my responses. Whenever a person opens this url, the survey should “ask” this question – Do I already have this name (123) in the results? If yes, then send the person to a warning page (or just don’t let him submit the results).

Is this possible?

Thanks,
Nik

it asked
    0
    qc 558 Rep.

    You should be able to accomplish this by using Custom Scripting and Skip/Disqualify Logic. Your Custom Script would use the sgapiGetQueryResponseCount function to check for how many responses you already have for those URL variables, and then you disqualify the survey if that count is greater than 0.

    Just keep in mind that there’s possibly a few minutes delay between when the user submits their survey and when the responses actually show up in the database for querying, so if you have a user who’s determined to submit multiple responses back-to-back, the sgapiGetQueryResponseCount may return a count of 0 when there was already one or more responses.

    it commented
      • Hi,

        I’ve found this code in the knowledge base but it seems that I’m missing something:

        %%qid = 16;
        %%id = sgapiGetValue(%%qid);
        %%sid = 2603758;
        %%message = “Sorry, you have already taken this survey.”;

        %%filter = “&filter[field][0]=[question(“.%%qid.”)]&filter[operator][0]==&filter[value][0]=”.%%id.”&filter[field][1]=status&filter[operator][1]==&filter[value][1]=Complete”;

        %%api = sgapiList(%%sid,1,1,%%filter);

        if(%%api[‘total_count’] > 0) {
        sgapiDisqualify(%%message);
        }

        Maybe I’m missing something obvious?

        Thanks for your help,
        Nikola

      0

      If I understand your proposal correctly, you want to create a unique link for each respondent to prevent them from responding more then once to the same survey.

      You have a good idea, but SurveyGizmo can create these unique links for you.  Review the SurveyGizmo Documentation – https://help.surveygizmo.com/help/article/link/create-unique-links.

      Basically, you create an email campaign and add names and email addresses to the contact list.  This automatically generates a unique link for name on the contact list.  You can then export these unique links and send them out through other means. These unique links will be the respondent’s only access to the survey and will not work after it has been completed.

      There is an assumption that you have names and email addresses for all of your respondents.  You can still use this process even if you don’t have this information.  You can create dummy email addresses (nobody001@zzz.com) and add them as contacts.  It does not matter if the email addresses are not valid as long as they are properly formatted  and you do not actually use SurveyGizmo to send them out.

      Jim W (Moderator) answered
        • Hi Jim,

          Thank you for your help, your suggestion is awesome, but unfortunately it won’t help me accomplish what I was looking for. I am using Surveygizmo to automatically send a survey when a Zendesk ticket is solved (customer satisfaction survey). This means that an email is being sent with some predefined fields populated using URL variables (ticket ID, requester name, Zendesk agent’s name, etc…). When a customer completes the survey, we are getting his responses, but it would be great if we could prevent that customer from accessing the survey again sometime in the future and sending another responses for the same ticket.

          So, what I would like to have is a note to survey taker – “you are trying to submit another response for ticket #1234 which is not possible since we already have your response from before”. Or if that’s not possible, I would like that response not to be saved in the response list, even if the survey taker submits it few more times for some reason.

          Maybe I am asking too much, but I don’t think this is impossible since there is a logic already built-in the Surveygizmo questions. I just need something like this:

          — If “hidden value” is “something”, show “thank you” page, or hide questions etc.

          Any ideas? :)

          Thanks,
          Nik

        ×

        Login

        Question stats

        • Active
        • Views1851 times
        • Answers2 answers
        • Followers0 followers