You are here

function fb_form_form_alter in Drupal for Facebook 7.3

Same name and namespace in other branches
  1. 5.2 fb_form.module \fb_form_form_alter()
  2. 5 fb_form.module \fb_form_form_alter()
  3. 6.3 fb_form.module \fb_form_form_alter()
  4. 6.2 fb_form.module \fb_form_form_alter()

Implementation of hook_form_alter().

File

./fb_form.module, line 36
This module defines facebook-specific form elements for use with Drupal's form API.

Code

function fb_form_form_alter(&$form, &$form_state, $form_id) {

  /* Drupal allows no clean way to set $form['#type'], so we hack... */
  if (isset($form['#fb_form_type_hack']) && ($type = $form['#fb_form_type_hack'])) {
    $form['#type'] = $type;
    unset($form['#fb_form_type_hack']);
  }
}