I could reject the form by checking either the CSRF token or by adding some other token to my DB and check if that was already used, but I was wondering if there seems to be an easier way to handle this with javascript (using jquery would be acceptable)?
I want to avoid concurrency of two/three event submissions. Disabling the button/form with on click
and submit
events did not work.
Example:
$("#request-form").submit(function() {
$(this).attr('disable', true);
});
$('#btn_modal_submit').on('click', function() {
$(this).attr('disable', true);
});