I am using entity registration module for node registration.Now i wants to export the registrants.
I am using view export module to export registrants list. Its working fine
But as the registration fields is different per node i can not add a fix number of field to export.
I am trying to use global php field, its working for single column.
Is there any alternatives?
What other i have tried?
function paticipant_export_views_pre_view(&$view, &$display_id, &$args) {
if ($view->name == 'paticipants_export') {
views_db_object::add_item($view->current_display, 'field',
'field_data_field_first_name_1', 'field_first_name_1',
$options = array(
$handler->display->display_options['fields']['field_first_name_1']['id'] = 'field_first_name_1',
$handler->display->display_options['fields']['field_first_name_1']['table'] = 'field_data_field_first_name_1',
$handler->display->display_options['fields']['field_first_name_1']['field'] = 'field_first_name_1',
), $id = NULL);
}
}
Thanks for your suggestion.
hook_views_pre_view
because the query has already run and the data retrieved by Views. This is why you could usehooks_views_pre_build
to add fields before the query is built, a similar question (changing a view before it is run) can be seen here: drupal.stackexchange.com/questions/1561/… alternatively try this dropbucket.org/node/1178