Support

Home Forums Event Espresso Premium View / search question field as a column on admin registrations table

View / search question field as a column on admin registrations table

Posted: October 10, 2016 at 4:41 am


iproject

October 10, 2016 at 4:41 am

Hi! I would like to search / view a question field on the Events espresso registrations list.
I can view this info: View image
But I would like to view as a new column the ID and the Second Name.
Is it possible?
Also we need to search for these fields.

Thank you!


Josh

  • Support Staff

October 11, 2016 at 1:57 pm

Hi there,

This is something that a developer may be able to help you with. You can request a quote from one of the recommended developers listed here:

https://eventespresso.com/developers/event-espresso-pros/


iproject

October 12, 2016 at 5:54 am

Thanks Josh! Finally I achieve that modifying /event-espresso/admin_pages/registrations/EE_Registrations_List_Table.class.php
this way:

$this->_sortable_columns = array(
'_REG_date' => array( '_REG_date' => TRUE ),   //true means its already sorted
'ATT_fname' => array( 'ATT_fname' => FALSE ),
<strong>'Apellidos' => array( 'Apellidos' => FALSE ),</strong>
'event_name' => array( 'event_name' => FALSE ),
'DTT_EVT_start'	=> array( 'DTT_EVT_start' => FALSE ),
'_REG_ID' => array( '_REG_ID' => FALSE ),
);

And adding the field after:

public function column_Apellidos( EE_Registration $item ) {
	$attendee = $item->get_first_related('Answer');
	return $attendee->value();
}

I’m on the searching part now ๐Ÿ˜‰


Josh

  • Support Staff

October 12, 2016 at 7:33 am

Please consider adding a filter hook instead of directly modifying the core plugin. This way you can submit a pull request on Github. When you directly modify the core plugin’s code, updating the plugin will wipe out your change, and if you avoid that by not updating, you will not be able to use new features and bug fixes in the upcoming releases.


iproject

October 12, 2016 at 7:37 am

Thank you! Whats the filter name? That’s my problem. Events Espresso has not a nice listing of hooks / filters ๐Ÿ™


Josh

  • Support Staff

October 12, 2016 at 8:13 am

I think you misunderstood my last reply. I’m actually recommending that you add a filter to the code, then you can submit a pull request. You can review the guide on naming conventions for filter and action hooks and that will help you give the filter hook(s) an appropriate name.

The support post ‘View / search question field as a column on admin registrations table’ 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