function fb_form_form_alter in Drupal for Facebook 5.2
Same name and namespace in other branches
- 5 fb_form.module \fb_form_form_alter()
- 6.3 fb_form.module \fb_form_form_alter()
- 6.2 fb_form.module \fb_form_form_alter()
- 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';
}
}