You are here

function spamicide_admin_add_form_id_submit in Spamicide 5

Implementation of hook_form_submit

_values

Parameters

$form:

File

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

Code

function spamicide_admin_add_form_id_submit($form, $form_values) {
  $spamicide_form_id = $form_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_values['spamicide_form_field']);
  _spamicide_set_css_file($form_values['spamicide_form_field']);
  drupal_set_message(t('Saved Spamicide settings.'), 'status');
}