I am building an online survey and need to find a way to allow for participants to leave the survey and return at a later time to finish. However, if someone returns to their unfinished survey, I need to prevent them from being able to go back and see their responses to the earlier portion of the survey. So essentially I need to hide the back button IF someone returns to complete a partial survey, but still record their responses from when they started the survey.
Does anyone have ideas for how to pull this off? The survey will use Contact Authentication based off of a pin number.
Page 1 / 1
Hello @uhrxx005 ,
The below solution can provide some help.
At the start of the survey capture the current date and time and store it in the embedded data(StartTime).
Now, in the header write a code that calculates the time difference between the now current time and the embedded data(StartTime).
If its (difference) greater then some threshold value( or rather the time that an individual would take to complete the survey in one go), then hide the "back" button.
The below solution can provide some help.
At the start of the survey capture the current date and time and store it in the embedded data(StartTime).
Now, in the header write a code that calculates the time difference between the now current time and the embedded data(StartTime).
If its (difference) greater then some threshold value( or rather the time that an individual would take to complete the survey in one go), then hide the "back" button.
This is useful, thanks Shashi. However, I can't seem to find where respondents can click 'save and return' although I do have it checked in my settings (up to a week). I collect email on the first page. I wonder if someone could enlighten me?
> @KateFenner said:
> This is useful, thanks Shashi. However, I can't seem to find where respondents can click 'save and return' although I do have it checked in my settings (up to a week). I collect email on the first page. I wonder if someone could enlighten me?
In email distribution, the answers of the current survey page is saved as soon as next button is clicked. So, you can update the text of Next button as 'save and continue' and add a custom html button in the page saying 'save and return', Add a click event function to this button - if this custom button is clicked, then click the Next button through js and set an ED (eg: FinishLater) as 1, on the next page load check if ED(FinishLater)==1 then hide all the buttons on the page and show the alert 'Your response till last page is saved, next time you will see the survey from here'
> This is useful, thanks Shashi. However, I can't seem to find where respondents can click 'save and return' although I do have it checked in my settings (up to a week). I collect email on the first page. I wonder if someone could enlighten me?
In email distribution, the answers of the current survey page is saved as soon as next button is clicked. So, you can update the text of Next button as 'save and continue' and add a custom html button in the page saying 'save and return', Add a click event function to this button - if this custom button is clicked, then click the Next button through js and set an ED (eg: FinishLater) as 1, on the next page load check if ED(FinishLater)==1 then hide all the buttons on the page and show the alert 'Your response till last page is saved, next time you will see the survey from here'
Thanks Shashi, that's brilliant.
So basically, the invite has to be sent by email to be able to have the button? Great to know, thanks.
So basically, the invite has to be sent by email to be able to have the button? Great to know, thanks.
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.