function _spamicide_get_field in Spamicide 7
Same name and namespace in other branches
- 5 spamicide.module \_spamicide_get_field()
- 6 spamicide.module \_spamicide_get_field()
Get the spamicide field name and .css file_name
@todo re-work this to prevent errors showing up
Parameters
$form:
Return value
the spamicide field name and .css file_name to call or FALSE
3 calls to _spamicide_get_field()
- spamicide_form_alter in ./
spamicide.module - Implements hook_form_alter().
- spamicide_pre_render_place_spamicide in ./
spamicide.module - Place the spamicide field just before the submit button
- spamicide_validate in ./
spamicide.module - Implements hook_validate().
File
- ./
spamicide.inc, line 26 - This module provides yet another tool to eliminate spam.
Code
function _spamicide_get_field(&$form) {
$spamicide = db_query('SELECT enabled, form_field FROM {spamicide} WHERE form_id = :form', array(
':form' => $form,
))
->fetchObject();
if (is_object($spamicide) && $spamicide->enabled) {
return $spamicide->form_field;
}
else {
return FALSE;
}
}