Continue an Incomplete Survey
Respondents may not complete your survey in a single session. In this case, you can restore their answers from the previous session next time they get to the survey. Incomplete results can be loaded from your database or the browser's localStorage
. This demo shows how to save and restore incomplete survey results and the last visited page from localStorage
. To test this functionality, answer a couple of questions and reload the page. Your answers should persist. Read more...
Respondents may not complete your survey in a single session. In this case, you can restore their answers from the previous session next time they get to the survey. Incomplete results can be loaded from your database or the browser's localStorage
. This demo shows how to save and restore incomplete survey results and the last visited page from localStorage
. To test this functionality, answer a couple of questions and reload the page. Your answers should persist.
To save incomplete results, implement a function that sends them to your server or saves them in localStorage
(see the saveSurveyData
function in code). Call this function within SurveyModel
's onValueChanged
and onCurrentPageChanged
event handlers to save the results when users change a question value or switch between pages. If you use localStorage
, you also need to delete survey results from it when the survey is completed because they no longer need to be restored. Handle the onComplete
event for this purpose.