Would you like to display hidden fields in entry exports? It’s very simple and all you need to achieve this is a single line of code.
By default, Hidden Fields are hidden when exporting entries. Using this simple snippet you can include these fields when exporting entries.
Please keep in mind, this snippet doesn’t just apply to the Hidden Field form field, but also will display any deleted fields that were previously included on the form and may have since been removed.
Adding the snippet
Just copy and paste this snippet to your site.
If you need help knowing where and how to add snippets to your site, please check out this tutorial.
/** * Include hidden fields in your entry exports * * @link https://wpforms.com/developers/how-to-display-hidden-fields-in-entry-exports/ */ add_filter( 'wpforms_entry_csv_attachment_include_hidden', '__return_true' );
And that’s all you need to include hidden fields in your entry exports. Would you also like to remove line breaks from your exports? Check out our How To Remove Line Breaks From CSV Exports.