You are here

function hook_webform_component_delete in Webform 6.3

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

Respond to a Webform component being deleted.

Related topics

1 invocation of hook_webform_component_delete()
webform_component_delete in includes/webform.components.inc

File

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

Code

function hook_webform_component_delete($component) {

  // Delete a record in a 3rd-party module table when a component is deleted.
  db_query('DELETE FROM {mymodule_table} WHERE nid = %d AND cid = %d)', $component['nid'], $component['cid']);
}