Drupal 7: Webform results->Submissions: how to add or modify columns here
When I click on "Results" and then "Submissions" I see the following columns:
#, Submitted, User, Ip address, Operations
Can you help me add a few columns from my form here?
or If there is a way I can remove the whole page/option? (I know I can remove the hook_alter_menu() and remove the menu item but it shows the page on clicking on results tab as it is the default view)Can you please开发者_开发问答 help me in removing the whole page or modifying it?
Well the webform module uses the Drupal API really well. So there is a theme function that (webform_theme) that you might use for your process.
Inside this hook_theme() implementation you find and associated array with these two keys:
'webform_results_submissions_header' => array(
'variables' => array('node' => NULL),
'file' => 'includes/webform.report.inc',
),
'webform_results_submissions' => array(
'render element' => 'element',
'template' => 'templates/webform-results-submissions',
'file' => 'includes/webform.report.inc',
),
All you have to do now is provide your own implementations for the header and rows using your own hook_theme and you are done.
精彩评论