the default login form in drupal doesn’t have any javascript to check whether the fields(Username and password) are empty or not before submitting the form.
so, i want to add it onsubmit to the user login form..how can i do that?
the default login form in drupal doesn’t have any javascript to check whether the
Share
The best way would be to just create a module that adds a .js file (via drupal_add_js()) that does something like this (note: the classes here are just a guess, didn’t check the actual class names):