Check this example for using two buttons to accomplish what you're
after. Basically, your validate/lock script goes on a visible "submit"
button and then fires the click event of a second button that does the
actual
submission.http://www.assuredynamics.com/index.php/portfolio/check-if-form-is-signed-before-emailing/