1

I created my own function to validate username and password from the login form, and it's working great in FF and Chrome, but does not work in IE 8 and 9.

I'm using hook_form_alter to catch the loginform and then I replace the default validation function "user_login_authenticate_validate" with "my_own_validation_function" in the $form['#validation'] array.

But for some reason the new validation function never gets called in IE, but I've verified that the default validation function is replaced by printing the $form info, and it all looks great.

I'm not really sure of where to go from here, I've spent way to much on this now ;)

Any help appreciated!

1

The Form API works via PHP and is executed in its entirety on the server. There really should be no question of browsers being involved in the equation. That is, unless you are doing something with JS (or CSS/anything client side) that might affect form input.

I would:

  1. Clear all my caches.
  2. Ensure that I'm working on the same page, site (and as the same user) in both FF and IE.
  3. When you mention "printing the $form info", I assume that you are using the Devel module. If you aren't, you should be. Devel's dpm() function is the best way to debug these things by adding diagnostic print statements in each step - the form, the validation hook and the submit hook.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.