Support

Home Forums Event Espresso Premium CSV field data replication

CSV field data replication

Posted: November 15, 2019 at 5:21 am

Viewing 4 reply threads


vrwaadmin

November 15, 2019 at 5:21 am

I almost have the CSV exactly as I need it, with one exception.

My registration form collects Billing (the “address” question group) and Personal (the required group of the first registrant). Each add’l registrant only collects Personal group. One organization pays for everyone, so we don’t want to ask same questions for each registrant.

In the CSV, as would be expected, the fields are blank for the add’l registrants as it wasn’t collected.

Is there a way to replicate that “address” group data so it is added to all add’l registrants in the background and thus appears complete in the CSV?

Thank you for trying to understand my clunky description.


Tony

  • Support Staff

November 15, 2019 at 5:27 am

Hi Jace,

Sure there is, we have a snippet to do that here:

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

You can add that to a custom functions plugin on your site, we have some documentation on creating one here:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/


vrwaadmin

November 15, 2019 at 6:40 am

The address fields are still blank, but other data pulled over.

I must have something wrong. I’ve added the code to my custom functions plugin php file and some fields are now populating.

Does it matter what order the code appears in the functions php file?
If I changed the name of the question group, would that matter?

Thanks Tony!


Tony

  • Support Staff

November 15, 2019 at 9:30 am

No, the priority the functions run on the hook matter (set on Line 9), but not the order in the functions file. Changing the Address group name also won’t matter.

The problem isn’t the order, the address questions are assigned to the EE Contact linked to the registration. The snippet I gave you adds the value from the Primary Registrants registration questions and applies them to the unanswered additional registrant registration questions, I completely forgot about the separation.

So as the address questions apply to the contact, they aren’t pulled in with the above, or I should say weren’t. I’ve updated that snippet to include address questions, please copy recopy the function and replace the one on your site.

Does it work for you now?


vrwaadmin

November 26, 2019 at 9:56 am

Thanks Tony, that worked great!!

Viewing 4 reply threads

The support post ‘CSV field data replication’ 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