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.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | webform_anon_submission_access.patch | 11.21 KB | quicksketch |
| #2 | anonymous_own_submission_2.patch | 3.24 KB | kndr |
| #1 | anonymous_own_submission.patch | 2.59 KB | kndr |
Comments
Comment #1
kndrI 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).
Comment #2
kndrI 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.
Comment #3
summit commentedSubscribing, greetings, Martijn
Comment #4
kndrOnce 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.
Comment #5
quicksketchThanks 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.
Comment #6
quicksketchMarked #578730: Anonymous user can register and delete his submissions duplicate.
Comment #7
ericclaeren commentedI 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.
Comment #8
quicksketchThe 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.
Comment #9
quicksketchStarting 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.