function spamicide_admin_adform_form in Spamicide 6
Same name and namespace in other branches
- 7 spamicide.module \spamicide_admin_adform_form()
Form for adding spamicide functionality to an existing form
Parameters
$spamicide_form_id:
Return value
$form
1 string reference to 'spamicide_admin_adform_form'
- spamicide_menu in ./
spamicide.module - Implementation of hook_menu().
File
- ./
spamicide.module, line 217 - This module provides yet another tool to eliminate spam.
Code
function spamicide_admin_adform_form($form, $spamicide_form_id = NULL) {
$form = array();
// use given spamicide form_id
$form['spamicide_form_id'] = array(
'#type' => 'textfield',
'#title' => t('Form ID'),
'#description' => t('The Drupal form_id of the form to add the Spamicide to.'),
'#value' => check_plain($spamicide_form_id),
'#disabled' => TRUE,
);
$form['spamicide_form_field'] = array(
'#type' => 'textfield',
'#title' => t('Form field'),
'#default_value' => 'feed_me',
'#description' => t('The name you want for the field. Use only letters, numbers, and the underscore character(_).'),
);
// redirect to general Spamicide settings page after submission
$form['#redirect'] = 'admin/settings/spamicide';
// submit button
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Save'),
);
return $form;
}