Howdy,
I need to perform some complex conditional logic with jquery/javascript on a form with multiple pages. I have logic working on click of the specific page’s next button. But I need to prevent the next click event from happening if my logic fails.
I have tried using e.preventDefault();, and searched for other options.
however, the event still submits / clicks next. here is a simplified version of my code:
Hi @user5d850a2a60b22044
It looks like you are trying to prevent the default next button behavior from happening by using e.preventDefault(); and return false;, but these lines of code are at the end of the click event handler function and will not be executed if the next page is shown.
To prevent the default next button behavior from happening, you can either:
Return false at the beginning of the click event handler function: