1

I have an additional security requirement (in addition to SSL) and I'm looking for a method (either a plugin or custom solution) of how to encrypt and store submissions from Contact Form 7 in the database. For example there are plugins such as Flamingo that allow the submissions to to be stored in the DB, there are fore other form platforms such as Gravitate Encryption that encrypt the submissions in the DB. Is there an option or method to encrypt CF7 submission data within the SQL database?

closed as off-topic by Howdy_McGee Jul 25 '17 at 21:16

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

  • I don't know of an existing plugin, but you can hook into wpcf7_mail_sent (see code here), encrypt the data and save it in the database – kero Jun 20 '17 at 8:21
  • Keep in mind if the data is sensitive enough to encrypt, sending it via email at all is insecure. – WebElaine Jun 20 '17 at 16:04
  • @WebElaine It won't be sent via email just needs to be stored in DB – Sam Jun 22 '17 at 18:01
  • Probably best to contact the plugin author directly. – WebElaine Jun 22 '17 at 19:32
2

As @kero said, use a CF7 hook. I'd use the wpcf7_before_send_mail hook. Grab data from the CF7 form object's fields, and use those values to store data.

I wrote a post to myself on how to get data from the CF7 form object here: http://securitydawg.com/changing-contact-form-7-with-the-wpcf7_before_send_mail-hook/ . You could use that to get started, just insert your code/function that reads the fields from the CF7 object and then store that data.

Good luck!

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