I have a function that is called when the user clicks the Submit button. It updates a field value that I'm using to track when the submit occurred.
$(".action-btn.Submit").on('click', function() { //steps of the function go here });
This works to call the function, unfortunately, it processes the function every time the button is clicked, regardless of whether the submit actually processes or not. For instance, if required fields are missing, it will still process this function. That's not what I want to occur.
Does anyone know a way to limit processing of the function to only when the submit is successful?