I'm using Webform to set up a number of enquiry forms on a company's extranet and they require submissions to be confidential. Since access to anything on the extranet requires user login, the forms can't be submitted anonymously and some user info is associated with each submission.

I can get around this issue in outgoing emails by removing the user-specific info from the email template, but submissions stored in the database still retain user info.

I suppose my question is this: how can I disable Webform submissions from being recorded in the backend, OR, how can I modify recorded submissions to remove user info (basically to store nothing but the date/timestamp and message)?


Well you can always use form altering to provide you own submit function

  • you can remove the fields which you don't want and in submit handler you can encrypt/remove any info you want.
    – AgA
    Jun 27 '12 at 12:01
  • OK, I started using this method, but it got me wondering if Webform itself provided any hooks that were more convenient for the task, and actually there is (in 3.18 at least): hook_webform_submission_presave(). So in my case, this was sufficient: function MYMODULE_webform_submission_presave($node, &$submission) { $submission->uid = 0; $submission->remote_addr = ''; }
    – Riari
    Jun 27 '12 at 15:13

Another option is the Webform Rules module. You likely have to implement your own action though. Here is an excerpt about it from the module's project page:

... adds rules integration on webforms.

Did you ever want to react on webform submission using rules but couldn't find the proper event? Webform Rules makes it possible to catch webform submissions by rules and do whatever you'd like to do with it (meaning: do whatever rules let you do with it).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.