You are here

function hook_webform_component_insert in Webform 6.3

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

Respond to a Webform component being inserted into the database.

Related topics

1 invocation of hook_webform_component_insert()
webform_component_insert in includes/webform.components.inc
Insert a new component into the database.

File

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

Code

function hook_webform_component_insert($component) {

  // Insert a record into a 3rd-party module table when a component is inserted.
  db_query("INSERT INTO {mymodule_table} (nid, cid) VALUES (%d, %d)", $component['nid'], $component['cid']);
}