For a while I have been using the following code...
$("input[type=submit]:not(.noHide)").one('click', function() {
$(this).hide();
$(this).click(function () { return false; });
});
to disable form submit buttons on click, primarily to avoid double clicks submitting twice.
I now have a form or two with required fields...
<input type="date" name="DatePurchased" required>
and this kind of breaks since the submit button is now gone once the omission is corrected.
Is there a way to disable the button only after a successful submission and not just a click?