Support

Home Forums Event Espresso Premium CSV Not showing additional questions (2)

CSV Not showing additional questions (2)

Posted: August 22, 2018 at 1:09 pm

Viewing 1 reply thread


missourireschools

August 22, 2018 at 1:09 pm

I am trying to download a csv report to create a sign in sheet. I need to show the additional questions but it is not showing up on the csv report.Some registrations do but not all. I am using the additional questions and multi event registration extensions. I’m guessing because of the additional questions not being enabled for additional registrations and as well as it only showing the registration additional questions on the primary event registered. Is there any way to create a csv file that will grab the primary reigstration additional question?

Your last reply:
Hi,

If I understand what you’re asking, I think you would need to require the additional questions for additional registrations in order for there to be additional answers for additional registrations.

Short of doing that it would require some custom PHP programming in order to pull answers from the primary attendee and apply all of those answers to all of the related registrations in that transaction. That seems possible because there’s a filter hook that allows for filtering each row of the CSV:

FHEE__EE_Export__report_registrations__reg_csv_array (link to its source)

If you’re familiar with programming with PHP and using filter hooks via the WordPress plugin API, then you should be able to build a filter function that loops through each group of registrations and copy over Primary reg. answers over to the related additional registrations.

Is there anyway you can walk me through this?


Josh

  • Support Staff

August 22, 2018 at 1:26 pm

I can help get you started in the right direction.

The steps in order would generally be:
1) Follow this guide to set up a custom functions plugin:
https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/
2) In the custom plugin you’ll create a custom function. Here’s an example to get you started:

function copy_answers_from_primary_registrants(
  $reg_csv_array, 
  $reg_row
) {
    //Check if this is the primary registrant
    if( $reg_row[ 'Registration.REG_count' ] !== '1' ) {
         // add your code to copy the answers from the Primary Registrant here
    }
    return $reg_csv_array;
}
add_filter( 'FHEE__EE_Export__report_registrations__reg_csv_array', 'copy_answers_from_primary_registrants', 11, 2 );

3) add the code to copy the answers from the related primary registrant where shown

If you’re in need of someone to write all of the code for you, these folks can give you a quote.

Viewing 1 reply thread

The support post ‘CSV Not showing additional questions (2)’ 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