I have a form like so.
<form name="theform" id="theform">
<input type="text" name="name">
<input type="submit" id="one">
<input type="submit" id="two">
</form>
I am trying to use this validation
http://www.position-absolute.com/articles/jquery-form-validator-because-form-validation-is-a-mess/
What I need to happen is if id#two is clicked the validation occurs, if #one is clicked it just submits the form.
I have it working for both buttons right now. I am not sure how to set it up using this plugin to do what I need it to do because this plugin binds itself to the submit buttons.
$("#theform").validationEngine({
ajaxFormValidation: false,
onValidationComplete: function(form, status){
$('#ccformmain').submit();
}
});
Any help is appreciated.
Thanks!
You could bind to a ‘click’ event on the second button and detach the validationEngine