You are here

function botcha_form_delete_form_submit in BOTCHA Spam Prevention 7.2

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

Submission handler of BOTCHA form deleting.

File

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

Code

function botcha_form_delete_form_submit($form, &$form_state) {
  $form_id = $form_state['values']['botcha_form_id'];
  Botcha::getForm($form_id, FALSE)
    ->delete();
  drupal_set_message(t('Deleted BOTCHA protection for form %form_id.', array(
    '%form_id' => $form_id,
  )));
  $form_state['redirect'] = Botcha::BOTCHA_ADMIN_PATH . '/form';
}