Gravity Forms personal data exporter and eraser

When WordPress 4.9.6 launched on May 17, 2018 it came with new tools for exporting and erasing personal data that you may have collected (you know, GDPR and all). But Gravity Forms as of version 2.3.2 doesn’t integrate with these tools. Fortunately, it is really easy to write your own exporters and erasers.

I wrote this code in a short amount of time at a very late hour, so you might want to scrutinize it before you toss it into a production site. Here is the code you can simply drop into your WordPress installation as an mu-plugin:

If you actually looked at the code, you might have noticed that we don’t just search through the email type of fields, but match all entries with any field that has the value of the email address we’re searching for. If you want to change that yourself, the Gravity Forms API has a get_fields_by_type method you can utilize and use those field IDs as the key value for the search criteria.

Why didn’t I release the Gravity Forms personal data exporter/eraser as a proper plugin?

Well, first of all, that isn’t as effortless as just dumping a file as a Gist on GitHub. Secondly, I hope that someone else – preferably Rocketgenius, Inc. (the company behind Gravity Forms) – feels it is worth maintaining it. I simply don’t have that time on my hands.

If you find the Gravity Forms personal data exporter/eraser useful or have any improvements to it, please leave a comment below.

1 Comment

Comments are closed.