Support

Home Forums Event Espresso Premium Customizing csv output with custom fields

Customizing csv output with custom fields

Posted: September 7, 2022 at 1:21 am


TownCountry

September 7, 2022 at 1:21 am

We use this code snippet (https://github.com/eventespresso/ee-code-snippet-library/blob/master/admin/registration-reports/core/tw_ee_registration_report_limit_columns_shown.php) to customize the CSV output to our requirements. However, for some events we have also defined different custom fields for the registration form, which are now not included in the csv output. Is there any way to always export the custom fields in full?


Tony

  • Support Staff

September 7, 2022 at 9:18 am

Hi there,

Yes, but it requires a little prep work on your part for it to work.

Rather than using a ‘whitelist’ snippet like above you need to switch to a snippet to exclude specific fields, like this:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/admin/registration-reports/core/tw_registration_report_exclude_fields.php

With that snippet you are removing specific fields from the CSV and all other remain, meaning when events change the question used those aren’t in the exclude list so still get added to the CSV.

Is that what you are looking for?


TownCountry

September 8, 2022 at 12:24 am

Is it also possible to define the sequence with it?


Tony

  • Support Staff

September 8, 2022 at 9:12 am

Hmm, you’ll need a combination of both really, something like this:

https://gist.github.com/Pebblo/a4e1e58edb5c20f774d77056fe8d70fc

The support post ‘Customizing csv output with custom fields’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso