I have a validation script that runs when a user clicks the form submit button.
I want to pass variables to this form and auto execute the validation script by injecting a piece of code.
I have tried this:
$('#theform').submit();
but it bypasses the validation that would have happened had a user manually clicked the button.
is there a way to emulate a user 'click' and execute the form submit triggers.