function ajax_register_form_alter in Ajax Login/Register 6
Same name and namespace in other branches
- 6.2 ajax_register.module \ajax_register_form_alter()
- 7.4 ajax_register.module \ajax_register_form_alter()
- 7.3 ajax_register.module \ajax_register_form_alter()
File
- ./
ajax_register.module, line 67
Code
function ajax_register_form_alter(&$form, $form_state, $form_id) {
if ($form_id == 'user_login') {
//Set form to work with ajax
$form['#ajax'] = array(
'enabled' => TRUE,
);
}
else {
if ($form_id == 'user_register') {
//Set form to work with ajax
$form['#ajax'] = array(
'enabled' => TRUE,
);
}
else {
if ($form_id == 'user_pass') {
//Set form to work with ajax
$form['#ajax'] = array(
'enabled' => TRUE,
);
}
}
}
}