0
How can I make my form not to sumbit the same form several times. I’m having this problem because some users are clicking save several times, not waiting for the screen update, so it is saving several duplicate records.
I found some Jquery validations but none so far helped 100%. 1º I tried to disable the button when click save, but it stopped working in the case of there being a required field I could no longer validate to enable the Save button again.
$('form').submit(function(){
$(this).find('button[type=submit]').prop('disabled', true);
return true; // return false stops the from from actually submitting.. this is only for demo purposes
});
I don’t know what’s the best solution to this problem...
In my codes I disable the button and enable again on the return of the request.
– Barbetta
How would I get the return?
– Eluander J. F. Lopes
need all ajax request code you are doing to see how it would look
– Barbetta
Worse than I don’t do the ajax request. I’m using Html.Beginform.
– Eluander J. F. Lopes