I have a third party form to track users on the page. I need to track all page submits on the page including submit fails due to js validations. Broad structure is as following:
<form>
//Elements
</form>
<a id="btnSubmit"></a>
I do not have control over structure of the form. To track the form submits I am using anchor tag click event: $('#btnSubmit').click(function () { //my code });
I am not using form.submit as the js code used in form validation prevents form.submit event from being called. It works well with click event except when user submits form with enter key.
How can I track enter key form submit without form.submit?