[eluser]Evil Wizard[/eluser]
I assume that is JavaScript?
Using something like jquery to overwrite and hook into the form submit event
Code:
$(document).ready(function () {
$('#form_id').submit( function () {
if(validateLogin()) {
$('#form_id').submit();
};
return false;
});
forcing the submit to return false all the time prevents the form from being submitted except by execution of code.