You are here

function botcha_form_delete_form_submit in BOTCHA Spam Prevention 6.2

Same name and namespace in other branches
  1. 7.2 botcha.admin.inc \botcha_form_delete_form_submit()

Submission handler of BOTCHA form deleting.

File

./botcha.admin.inc, line 170
Implementation of botcha administration forms.

Code

function botcha_form_delete_form_submit($form, &$form_state) {
  $botcha_form = $form['#botcha_form'];
  drupal_set_message(t('Deleted BOTCHA protection for form %form_id.', array(
    '%form_id' => $botcha_form->id,
  )));

  // Remove BOTCHA protection for form.
  $botcha_form
    ->delete();
  $form_state['redirect'] = Botcha::BOTCHA_ADMIN_PATH . '/form';
}