You are here

function spam_form_alter in Spam 6

Same name and namespace in other branches
  1. 5.3 spam.module \spam_form_alter()

Drupal form_alter() hook.

File

./spam.module, line 655
Spam module, v3 Copyright(c) 2006-2008 Jeremy Andrews <jeremy@tag1consulting.com>. All rights reserved.

Code

function spam_form_alter(&$form, &$form_state, $form_id) {
  foreach (module_list() as $module) {

    // For PHP4, allows modules to update $form.
    $function = $module . '_spamapi_form_alter';
    if (function_exists($function)) {
      $function($form, $form_state, $form_id);
    }

    // Alternative method, for modules that don't need to update $form.
    $function = $module . '_spamapi';
    if (function_exists($function)) {
      $function('process_form', $form_id, $form);
    }
  }
}