You are here

function birthdays_form_alter in Birthdays 5

Same name and namespace in other branches
  1. 6 birthdays.module \birthdays_form_alter()

Implementation of hook_form_alter().

File

./birthdays.module, line 1142
The Birthdays module allows users to add their birthday to their profile. It lists birthdays on a seperate page and in different blocks. Users can receive an e-mail on their birthday automatically, and the administrator can receive daily reminders of…

Code

function birthdays_form_alter($form_id, &$form) {
  global $_birthdays_field;
  if ($form_id == 'user_edit' && isset($form[$_birthdays_field->category]) || $form_id == 'user_register' && $_birthdays_field->register) {
    $form[$_birthdays_field->category][$_birthdays_field->name]['#process'] = array(
      'expand_birthdays_date' => array(),
    );
    $form[$_birthdays_field->category][$_birthdays_field->name]['#validate'] = array(
      'birthdays_date_validate' => array(),
    );
  }
}