You are here

function _spamicide_get_field in Spamicide 6

Same name and namespace in other branches
  1. 5 spamicide.module \_spamicide_get_field()
  2. 7 spamicide.inc \_spamicide_get_field()

Get the spamicide field name and .css file_name

Parameters

$form:

Return value

the spamicide field name and .css file_name to call or FALSE

4 calls to _spamicide_get_field()
spamicide_field_place_field in ./spamicide.module
Place the spamicide field just before the submit button
spamicide_form_alter in ./spamicide.module
Implementation of hook_form_alter
spamicide_validate in ./spamicide.module
Implementation of hook_validate
_spamicide_pre_render in ./spamicide.module

File

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

Code

function _spamicide_get_field(&$form) {
  $result = db_query("SELECT enabled, form_field FROM {spamicide} WHERE form_id = '%s'", $form);
  if ($result) {
    $spamicide = db_fetch_object($result);
    if (is_object($spamicide) && $spamicide->enabled) {
      return $spamicide->form_field;
    }
    else {
      return FALSE;
    }
  }
}