How to save data when completing a survey and does not finish?