You are here

function fb_form_form_alter in Drupal for Facebook 5.2

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

hook_form_alter.

File

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

Code

function fb_form_form_alter($form_id, &$form) {

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

  // Support for ahah (see ahah_forms.module)
  if (function_exists('fb_canvas_is_fbml') && fb_canvas_is_fbml()) {
    $form['#after_build'][] = 'fb_ahah_bind_form';
  }
}