function birthdays_form_alter in Birthdays 6
Same name and namespace in other branches
- 5 birthdays.module \birthdays_form_alter()
Implementation of hook_form_alter().
File
- ./
birthdays.module, line 776 - 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, &$form_state, $form_id) {
global $_birthdays_field;
if ($form_id == 'user_profile_form' && isset($form[$_birthdays_field->category]) || $form_id == 'user_register' && $_birthdays_field->register) {
$form[$_birthdays_field->category][$_birthdays_field->name]['#process'] = array(
'expand_birthdays_date',
);
$form[$_birthdays_field->category][$_birthdays_field->name]['#element_validate'] = array(
'birthdays_date_validate',
);
}
}