I have this code:
function THEME_form_user_login_alter (&$form, &$form_state){
$form['actions']['submit']['#ajax'] = array(
'callback' => 'ajax_process_form',
'wrapper' => 'user-login',
'effect' => 'fade',
'speed' => 'fast',
'method' => 'replace'
);
};
It work when i click on the submit button, but when i press ENTER Ajax doesn't get triggered.. Is there a way around that?
Edit: I tried to enable ajax on all fields and set keystroke to True, but then only one field is sent so i get an error as the form process script is expecting two fields.