Question T5008
Visible to All Users

Saving Local Storage data to SurveyJS

created 5 years ago

I want to save or send the result of the local storage. survey.SendResult Function requires survey.data to send the result to the SurveyJS Server. But if i want to send the Local Storage data then how can i do it. Normally we define var survey = new Survey.Model(surveyJSON) but suppose if there is no surveyJSON in the script then how can i define the survey to just put the data in survey.data to send result to the SurveyJS Server.

Answers approved by surveyjs Support

created 5 years ago

Hello,

What's the reason to save on SurveyJS service data which are not surevy result data? SurveyJS service is not supposed to be used this way.

Thanks, Serge
SurveyJS Team

    Comments (2)

      I think you misread me. I have stored the survey.data in local storage and then after coming back again i wanted to retreive the data from the local storage to store the data in surveyjs. Anyways i have found the solution i was facing an error while defining var survey = new Survey.Model(surveyJSON) . By removing surveyJSon it worked nicely.
      Thanks for the revert and support.

        Fine! Feel free to contact us in case of any further questions