function _spamicide_get_field in Spamicide 5
Same name and namespace in other branches
- 6 spamicide.module \_spamicide_get_field()
- 7 spamicide.inc \_spamicide_get_field()
Get the spamicide field name and .css file_name
Parameters
$form_id:
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 - Implementation of 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 - Implementation of hook_validate
File
- ./
spamicide.module, line 466 - This module provides yet another tool to eliminate spam.
Code
function _spamicide_get_field($form_id) {
$result = db_query("SELECT enabled, form_field FROM {spamicide} WHERE form_id = '%s'", $form_id);
if ($result) {
$spamicide = db_fetch_object($result);
if ($spamicide->enabled) {
return $spamicide->form_field;
}
else {
return FALSE;
}
}
}