You are here

function hook_webform_submission_delete in Webform 6.3

Same name and namespace in other branches
  1. 7.4 webform.api.php \hook_webform_submission_delete()
  2. 7.3 webform.api.php \hook_webform_submission_delete()

Respond to a Webform submission being deleted.

Parameters

$node: The Webform node on which this submission was made.

$submission: The Webform submission that was just deleted from the database.

Related topics

1 invocation of hook_webform_submission_delete()
webform_submission_delete in includes/webform.submissions.inc
Delete a single submission.

File

./webform.api.php, line 163
Sample hooks demonstrating usage in Webform.

Code

function hook_webform_submission_delete($node, $submission) {

  // Delete a record from a 3rd-party module table when a submission is deleted.
  db_query("DELETE FROM {mymodule_table} WHERE nid = %d, sid = %d", $node->nid, $submission->sid);
}