You are here

function spamicide_admin_add_form_id in Spamicide 5

Callback function for adding spamicide functionality to an existing form

Parameters

$spamicide_form_id:

Return value

$form

1 string reference to 'spamicide_admin_add_form_id'
spamicide_menu in ./spamicide.module
@file This module provides yet another tool to eliminate spam.

File

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

Code

function spamicide_admin_add_form_id($spamicide_form_id) {
  $form = array();
  $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;
}