Posted: August 31, 2017 at 3:08 am
As an add-on to this thread – https://eventespresso.com/topic/custom-attendee-exports-with-ee4/ – I have the code in place to only show specific fields and it works great. Is there a list somewhere of all the fields and their specific names so I can further tweak? Thanks in advance. |
|
Hi there, Do you mean the field names from within the CSV or additional fields? The CSV has the field names you can remove shown on row 1, you can copy the full field name from there and include it within the code you linked to. |
|
Thanks – ok, so I have the fields I want, however, when I export them to the CSV, they’re not in the order I set – is there a way to make sure the rows are in the order I want? |
|
The functions you are using don’t set any order, you setup an array that tells the function which field to include/exclude from the CSV. You’d need to change the order yourself within the function you are using, for example: https://gist.github.com/Pebblo/d6cec7c4a1ff75e818097665108556fa That uses array_merge() to filter the CSV row to match the order set in the |
|
Thanks. Does it matter how the fields are defined? In the original version, I had them as: __( ‘Last Name[ATT_lname]’, ‘event_espresso’ ),, while in your version you have them as: __( ‘Last Name’, ‘event_espresso’ ) . ‘[ATT_lname]’. If I need to use the version you outlined, what should I use as the third part of something like __( ‘comments’, ‘event_espresso’ ) |
|
It’s just building the column title but allowing for translations, so:
The database column name (in this example
In that example you would just have ‘comments’, if the CSV shows a DB column name next to the title, you need it in your function, if it doesn’t then you do not. |
|
Thank you! Extremely helpful. |
|
The support post ‘Custom Attendee Exports – Field Names’ 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.