I would like anonymous users to view their own form submissions after they have completed a form to give them a chance to print it out.

By default anonymous users can not view their submissions so I checked the permission "access own webform submissions" for anonymous users. The anonymous users can now view their submission but can also view any other anonymous user's submission.

Is there a way to allow anonymous users to view their own submissions before their session ends?
After they close the browser window or their session ends they would not need access to the submission.

Comments

kndr’s picture

Version: 6.x-2.7 » 6.x-2.9
Category: support » feature
Status: Active » Needs review
StatusFileSize
new2.59 KB

I need this feature in my application. My patch base on $_SESSION value and switch off cache in webforms if anonymous user has 'access own webform submissions' permission (this idea is borrowed from module cacheexclude).

kndr’s picture

StatusFileSize
new3.24 KB

I had to modify my patch since webform module doesn't allow to use %session for anonymous users. It is very important feature when cache is turned on but after aplying my patch, on every webform page cache is disabled and therefore I could allow to use %session for anonymous users.

summit’s picture

Subscribing, greetings, Martijn

kndr’s picture

Once more notice. Patch switches off the cache when user go to the submission pages. I think module cacheexclude should be used if the cache should be disabled on every webform page.

quicksketch’s picture

Version: 6.x-2.9 »

Thanks for the patch! No new functionality is being added to the 2.x version, so I'll review this for use there. I'm a bit wary of letting anonymous users edit submissions, but it's certainly better to restrict down anonymous users' access than let them just edit all anonymous submissions.

quicksketch’s picture

Title: Anonymous form submissions visible to other anonymous users » Allow anonymous form submissions to be viewed/edited
ericclaeren’s picture

I have a couple of websites running on drupal 5 which have this problem with webform, please add any solutions for D6 to version D5.
Otherwise I must install unsafe version to keep those sites working.

quicksketch’s picture

The Drupal 5 version is nearing end-of-life, especially considering that Drupal 7 will be out in a matter of months. No new features are being added to the 2.x version of Webform, so this won't be coming to Drupal 5 since the 3.x version will be Drupal 6 and Drupal 7 only.

quicksketch’s picture

Status: Needs review » Fixed
StatusFileSize
new11.21 KB

Starting with kndr's patch, I updated this feature to the 3.x version in the attached patch. I had to make several more changes to get things working as expected, such as the listing page of submissions should be accessible to anonymous users too. I did not include the change to the %session variable handling, as it was not related to the topic of the issue.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.