If respondents enter wrong token code -> "Please try again" + token form ?

More
4 months 2 days ago - 4 months 2 days ago #171131 by socius
socius created the topic: If respondents enter wrong token code -> "Please try again" + toke
Hi everybody,

edit: sorry - this post appears in the wrong forum (should be in "Can I do this with LimeSurvey?" but I clicked too fast)

I just noticed, that my survey is quite unfriendly. For my survey I send out a printed letter with the link to the survey and the token code. Respondents that enter the link see this page:



If they enter the code correctly they enter the survey - perfect. But if they make a mistake typing the code (which is not unlikely with randomly generated codes like that) they see the following page - and get stuck.





The problem is: in this situation there seems to be nothing they can do - no "Maybe there was a typo, please try again" - the Input form is gone. It is also not possible to go back via Browserbutton (for a "Go back and try again" message). It seems to me that the respondents who entered the code incorrectly are stuck here - and I fear that they would not try again (enter the link again, etc.).

Is there a way to make this more easy and friendly? It would be just fine, if the form did not disappear the error message was friendly and the respondents could try again. That would be great. Anybody knows how to achieve this? I'd really appreciate that.

Thanks a lot for your time and all the best,
G

PS: I still use LS 2.6.7LTS
Attachments:
Last Edit: 4 months 2 days ago by socius. Reason: Added LS version used, edit: sorry - this post appears in the wrong forum

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

More
4 months 2 days ago #171133 by socius
socius replied the topic: If respondents enter wrong token code -> "Please try again" + toke
Hi everybody,

I found an easy solution with the help of @Denis: www.limesurvey.org/forum/can-i-do-this-w...uthentication-copied

Just put a link back into the error message (s. below). That might not be as elegant as the error message and the form asking for the token again, but it's an easy one. Do not forget "newtest/Y" in the link.

$(document).ready(function(){
    if (typeof tokenlabel === "undefined"){
        tokenlabel ="YOUR TOKEN LABEL : ";
    }
    if (typeof tokentext === "undefined"){
        tokentext ="YOUR TOKEN TEXT DESCRIPTION";
    }
    if (typeof tokenerror === "undefined"){
        tokenerror ="<br><br><strong class='error'>YOUR ERROR MESSAGE with <a href=https://www.surveyurl.com/index.php/SURVEYSID/newtest/Y#>LINK BACK</a></strong>";
    }
 
   if ($("#tokenform").length )
   {
        $("#tokenmessage").html(tokentext);
        $("label[for='token']").text(tokenlabel);
   }
   else
   {
       $("#tokenmessage").html(tokentext+tokenerror);
   }
 
});


Thanks for reading!

Best,
G

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

More
4 months 2 days ago #171139 by DenisChenu
DenisChenu replied the topic: If respondents enter wrong token code -> "Please try again" + toke
See bugs.limesurvey.org/view.php?id=13580

Previously : we have the link to try again.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

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

More
4 months 2 days ago #171160 by socius
socius replied the topic: If respondents enter wrong token code -> "Please try again" + toke
Hi Denis,

thanks for your response! In my case this is not a problem of an expired session, but if respondents enter the token incorrectly (I use LS 2.6.7LTS). There is no link (as far as I can see) that would bring the respondents back to the form where they can enter the token again.

I'm satisfied with my solution so far, i.e. the code you provided and I complemented with a link.

Thanks and all the best,
G

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

More
4 months 2 days ago #171161 by DenisChenu
DenisChenu replied the topic: If respondents enter wrong token code -> "Please try again" + toke
About the token : i think there was a link in 3.0 alpha version. If we have one in session : it's easy to jhave one in bad token :)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
The following user(s) said Thank You: socius

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!