1👍
What you want to do must be done on the client side of your app.
a simple way to do this is to disable the submit input and add a spinner to it through javascript.
assuming you use jQuery and have fontawesome:
$(document).ready(function(){
$("SUBMIT BUTTON SELECTOR").click(function(){
var spinner = $("<i class='fa fa-spinner fa-spin'></spin>");
$(this).attr("disabled", "disabled").prepend(spinner);
});
});
Source:stackexchange.com