You are here

function spamicide_admin_adform_form_submit in Spamicide 6

Same name and namespace in other branches
  1. 7 spamicide.module \spamicide_admin_adform_form_submit()

Implementation of hook_form_submit

_values

Parameters

$form:

File

./spamicide.module, line 248
This module provides yet another tool to eliminate spam.

Code

function spamicide_admin_adform_form_submit($form, &$form_state) {
  $spamicide_form_id = $form_state['values']['spamicide_form_id'];

  // remove old settings
  db_query("DELETE FROM {spamicide} WHERE form_id = '%s'", $spamicide_form_id);

  // save new settings
  db_query("INSERT INTO {spamicide} (form_id, form_field, enabled, removable) VALUES ('%s','%s', 1, 1)", $spamicide_form_id, $form_state['values']['spamicide_form_field']);
  _spamicide_set_css_file($form_state['values']['spamicide_form_field']);
  drupal_set_message(t('Saved Spamicide settings.'), 'status');
}