You are here

function hook_webform_component_update in Webform 6.3

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

Respond to a Webform component being updated in the database.

Related topics

1 invocation of hook_webform_component_update()
webform_component_update in includes/webform.components.inc
Update an existing component with new values.

File

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

Code

function hook_webform_component_update($component) {

  // Update a record in a 3rd-party module table when a component is updated.
  db_query('UPDATE {mymodule_table} SET value "%s" WHERE nid = %d AND cid = %d)', 'foo', $component['nid'], $component['cid']);
}