You are here

function webform_conditional_delete in Webform 7.4

Delete a conditional rule group.

3 calls to webform_conditional_delete()
webform_component_delete in includes/webform.components.inc
Delete a Webform component.
webform_conditional_update in includes/webform.conditionals.inc
Update a conditional setting in the database.
webform_node_update in ./webform.module
Implements hook_node_update().

File

includes/webform.conditionals.inc, line 1383
Form elements and menu callbacks to provide conditional handling in Webform.

Code

function webform_conditional_delete($node, $conditional) {
  $transaction = db_transaction();
  db_delete('webform_conditional')
    ->condition('nid', $node->nid)
    ->condition('rgid', $conditional['rgid'])
    ->execute();
  db_delete('webform_conditional_rules')
    ->condition('nid', $node->nid)
    ->condition('rgid', $conditional['rgid'])
    ->execute();
  db_delete('webform_conditional_actions')
    ->condition('nid', $node->nid)
    ->condition('rgid', $conditional['rgid'])
    ->execute();
}