function hook_webform_component_insert in Webform 7.3
Same name and namespace in other branches
- 6.3 webform.api.php \hook_webform_component_insert()
- 7.4 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 269 - 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_insert('mymodule_table')
->fields(array(
'nid' => $component['nid'],
'cid' => $component['cid'],
'foo' => 'foo_data',
))
->execute();
}