embed icon indicating copy to clipboard operation
embed copied to clipboard

How to reset the survey once created?

Open jaunt opened this issue 4 years ago • 13 comments

I see survey progress is being stored in localstorage now, under typeform domain (which I have no access to from my javascript).

For example, if a user abandons the embedded survey then logs out of my app. I can see no way of clearing typeform's local storage. So the next user will see the previous user's progress.

jaunt avatar Apr 13 '21 22:04 jaunt

Hey @jaunt Thank you for your comment and concern. Each user should be identified uniquely, and it should not collide between users.

Did you experience something different?

picsoung avatar Apr 15 '21 01:04 picsoung

Hi @picsoung

When you say each user should be identified uniquely, how would that work? I'm not passing in any user identifier to createWidget. What I saw is that if I closed the browser part way through the survey and opened it up again, a fresh call to createWidget brought up the previously partially finished data. My webapp has the concept of a unique user, so I can't see how the typeform iframe is going to know anything about that, and whether my user has actually logged out or not. We have a policy to make sure there is no data hanging around when our user logs out of our web app.

It's great that there is some ability to now save progress, but I think there has to be some way for the webapp to force the survey to clear out its data and reset, and it would have to be able to be called at anytime, even if not when creating or during the survey. For example window.tf.clearStorage(''), that I can call when my user logs out.

jaunt avatar Apr 15 '21 04:04 jaunt

Hello, unfortunately there is no way to reset this at the moment. I have reached out the team responsible for this part and will let you know when there is anything like this planned.

mathio avatar Apr 21 '21 09:04 mathio

Thanks. It's funny because the old version doesn't seem to have this problem when used in pop-up mode. Once it's closed it doesn't seem to retain where it was. I hope this doesn't change, or I have no idea what we'll do.

jaunt avatar Apr 26 '21 16:04 jaunt

If I am not mistaken the progress is saved in browser local storage. It is saved and restored regardless of how you access the form - via embed or directly.

The only difference is when I access a form via custom domain and then use standard domain - the session is not persisted across domains due to technical and privacy limitations.

mathio avatar Apr 26 '21 20:04 mathio

@mathio I think you're right -- I guess even the old versions has this problem. So if a user of my webapp logs out, and another user logs in, their partially completed survey results will be still there. On a shared computer this is pretty much a show-stopper I think. Hmm.

jaunt avatar May 05 '21 20:05 jaunt

Hello @jaunt, sorry for the late response.

The direction we decided to take is to allow you to disable this feature (saving answers to local storage) in builder. Would this help your use case?

The team responsible for this is looking into it and we will let you know when it is available.

mathio avatar Jun 09 '21 10:06 mathio

Hi @mathio, I'd likely make use of that yes, simply for privacy reasons, but it's a little unfortunate as being able to work on the survey and come back later is a nice feature.

jaunt avatar Jun 10 '21 15:06 jaunt

I have the same issue on an app that embeds typeform. i currently embed it using an iframe, and provider my users the option to re-do a particular survey. having the browser cache repopulate everything is leading to issues where users change their answers, but some end up being blank and others don't seem to take the changes (possibly user error).

@mathio any progress on being able to disable the cache? also, you mentioned it's the same regardless of how typeform is used, but i'm wondering if there would be a way to clear the cache from a page that uses the in-line embed? since everything should technically be on the same domain, wouldn't it be possible to access the browser cache for the typeform and clear it?

dennisnewel avatar Jul 28 '21 15:07 dennisnewel

I would like this option as well. Currently we show users a list of events to review. When they hit "Review" we show them a form. We use the same form for each event.

However, currently, if they open a form for review, answer two questions, exit the form, and open one for a different event, their previous answers are still populated. Ideally this would not be the case and we could disable the cache.

Jesspu avatar Feb 17 '22 15:02 Jesspu

Hello, this feature has been between teams and on the bottom of the priority list until now. We will likely be able to move this feature forward in Q2 2022.

mathio avatar Feb 21 '22 19:02 mathio

@mathio, we just faced the same issue. I'm curious, how is your team not treating this a large security hole? Two distinct users should never see the same data. In all survey engines that I've used, I've never come across this issue. Sharing respondent data is a show-stopper for anyone that cares about security.

stavarotti avatar Apr 19 '22 21:04 stavarotti

any update on this? I am using it in react and I have table with diffrent records (but with same typeform I want to fill, just hidden fields values change) now once user submit the form I want fresh start the session

I found that typeform storing details by widget id

how to disable it for next form

image

niravjadatiya avatar Jul 22 '22 10:07 niravjadatiya

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Nov 25 '22 02:11 github-actions[bot]

We also are looking for this feature and require it for privacy purposes. I've been trying to find a way to disable it - I was originally told that embeds would be iframeless. Any chance this feature will be available soon?

geoguide avatar Jan 21 '23 00:01 geoguide

I am pleased to let you know I just opened a PR with this feature: https://github.com/Typeform/embed/pull/558

But first we need to get merge another PR to our internal project that introduces the query string flag. Internal PR is open and waiting for review.

mathio avatar Jan 21 '23 13:01 mathio

@mathio Thank you for the quick turnaround. Do you know how long PRs typically take to get approved on the internal project?

geoguide avatar Jan 23 '23 16:01 geoguide

The team responsible for this feature has decided to take a different approach. It will be implemented as a form-specific feature - you will be able to enable or disable storing partial responses to local storage when you create your form. This setting should take effect regardless if the form is embedded or not.

I was told the feature has been prioritized and will be delivered in the next 2-3 weeks.

This is not related to embed SDK anymore but I will keep this ticket open for visibility and let you know when it is ready.

mathio avatar Jan 24 '23 10:01 mathio

I see this feature available under survey settings. Thank you!

geoguide avatar Feb 16 '23 22:02 geoguide

Yes, it is now available in settings in the right hand sidebar:

Screen Shot 2023-02-17 at 11 20 09

mathio avatar Feb 17 '23 10:02 mathio