There are multiple forms on one page. in my code PHP captures which form is being submitted by submit button name like this:
if (!empty($_POST['submit-btn-name']))
It all works well without jquery validation. However when I try to validate each form with JQuery form validation plugin, the plugin's submit handler doesn't let PHP see which form has been submitted.
$("#profileupdate,#contactform").each(function(){
$(this).validate({
errorPlacement: function (error, element) { },
onkeyup: false,
submitHandler: function(form) {
form.submit();
}
});
});