The easiest way to achieve this is to disable the submit buttons after clicking.
Add the following javascript (jQuery) to your view:
$(function () { $('input[type="submit"]').click(function() { $(this).attr('disabled', 'disabled'); }); });
Remember to enable the buttons after completing the ajax request, if necessary:
$('input[type="submit"]').removeAttr('disabled');
UPDATE:
It is better to disable the submit button in the event handler of the form, because the user can submit the form by pressing the enter button:
$(function () { $('form').submit(function() { $('input[type="submit"]', this).attr('disabled', 'disabled'); }); });
bniwredyc
source share