Remove unwanted fields from Gravity Forms CSV export options

Ever had a situation where you’ve got Gravity Forms setup and you want to export entries in CSV format – but you don’t want certain fields… well ever, yet they show up in the export list of options?

I’m talking things like “Payment Amount” or “Payment Date” or other things like “Transaction ID” or even “IP” or “Source URL” or similar. Perhaps you just don’t need these at all, and you want to be able to “just export” by hitting “select all”?

In these circumstances, code comes to the rescue!

The snippets below, added to functions.php, or a custom functions plugin, or (even better) a custom plugin just for adding Gravity Forms alterations, will help you to remove these unwanted fields.

How to add unwanted fields from the list of available fields in CSV exports with Gravity Forms – for any form

Here’s the snippet to add this for ANY FORM:



How to add unwanted fields from the list of available fields in CSV exports with Gravity Forms – for one specific form

Here’s the same code again, only this time, we’re only targeting a particular form (form 3). This code comes directly from Gravity Forms’ great docs section. In my use-case, I wanted to remove from all forms, so I’ve listed that one first!



How to (quickly) get the field name to remove another field

For completeness, since I have added the snippets above, I’ll add a little more help, and explain how to find the field name to take out another element from the list:

1) Open the CSV export page for a form which contains the field you’d like to remove;
2) In your browser, right click and hit “inspect” over the relevant field (or view the source code and find the relevant field)
3) The name you want is included as value=”FORM_NAME_HERE” like in the example image below:

4) This name should be added to the comma separated array in the same format at the other items… likewise, you should remove any elements you wish to keep from my code snippet above!

Leave a comment, below, if this helped you get this done today, and make us feel warm and fuzzy about helping you get this done today 🙂

Leave a comment

No links of any kind allowed in comments - if you add any links, your comment will automatically be deleted.