You are here

function hook_webform_submission_update in Webform 6.3

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

Respond to a Webform submission being updated.

Note that this hook is called after a submission has already been saved to the database. If needing to modify the submission prior to updating, use hook_webform_submission_presave().

Parameters

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

$submission: The Webform submission that was just updated in the database.

Related topics

1 invocation of hook_webform_submission_update()
webform_submission_update in includes/webform.submissions.inc
Update a webform submission entry in the database.

File

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

Code

function hook_webform_submission_update($node, $submission) {

  // Update a record in a 3rd-party module table when a submission is updated.
  db_query("UPDATE {mymodule_table} SET (foo) VALUES ('%s') WHERE nid = %d, sid = %d", 'foo_data', $node->nid, $submission->sid);
}