You are here

function hook_webform_submission_update in Webform 7.4

Same name and namespace in other branches
  1. 6.3 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 function implements hook_webform_submission_update()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

webform_webform_submission_update in ./webform.module
Implements hook_webform_submission_update().
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 176
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_update('mymodule_table')
    ->fields(array(
    'foo' => 'foo_data',
  ))
    ->condition('nid', $node->nid)
    ->condition('sid', $submission->sid)
    ->execute();
}