hook_webform_submission_actions
Drupal 7 hook_webform_submission_actions($node, $submission)
Provide a list of actions that can be executed on a submission.
Some actions are displayed in the list of submissions such as edit, view, and delete. All other actions are displayed only when viewing the submission. These additional actions may be specified in this hook. Examples included directly in the Webform module include PDF, print, and resend e-mails. Other modules may extend this list by using this hook.
Parameters
$node: The Webform node on which this submission was made.
$submission: The Webform submission on which the actions may be performed.
Related topics
1 function implements hook_webform_submission_actions()
2 invocations of hook_webform_submission_actions()
File
- sites/
all/ modules/ webform/ webform.api.php, line 197 - Sample hooks demonstrating usage in Webform.
Code
function hook_webform_submission_actions($node, $submission) {
if (webform_results_access($node)) {
$actions['myaction'] = array(
'title' => t('Do my action'),
'href' => 'node/' . $node->nid . '/submission/' . $submission->sid . '/myaction',
'query' => drupal_get_destination(),
);
}
return $actions;
}

