Hopefully this one is quick...
How can I set an onSubmit event in the hook_form of a module?

thx

Comments

rohnjeynolds’s picture

Try something like this:

function hook_form() {
$form['#attributes']['onsubmit'] = 'return yourFunction()';
}