Sometimes you need to create some survey/webform which includes confidential data and where you don't want to correlate who replied what.
On that case there are two options,
1. Enable the default webform option "Confidential submissions" under "Advanced settings" of the webform
That will force users who want to reply the webform to logout before submitting the webform. By doing that all submissions will be created as authored by anonymous users and the submissions data can be considered confidential (still IP address will be recorded)
There is a few constraints for this method
- You cannot filter the users allowed to reply the webform by e-group or role
- A Re-Captcha mechanism needs to be put in place to avoid robots to spam your webform submissions
2. In case you need to bypass the previous constraints another approach is possible. This approach is based on the usage of "Webform Anonymous" module to anonymize the submissions and "CERN Confidential webform" to make the list of submissions confidential for site administrators. On this approach authenticated users can reply the survey/webform while having some degree of confidentiality. Less than the previous option.
This is how to enable this second option:
Install webform anonymous module locally, from the project page https://www.drupal.org/project/webform_anonymous (7.x-1.0-beta1)
Enable modules, CERN Confidential Webform and Webform Anonymous
Configure the webform you want to anonymize, Edit Webform content -> Form settings -> Anonymize results = Yes
Important, there is known problem of access denied on the submission confirmation page after a user submits the webform. As a workaround create a custom redirection url (Create Basic Page and paste it under Redirection location on the Webform settings)
Please note that users won't be able to edit or delete their own submissions due the anonymizer of the submissions.
Once configured administrators won't see usernames and/or IPs from the submissions list. Also viewing the submissions will get anonymized and same while downloading the data in Excel or CSV format.