I have added the below onclick
code to the submit button in order to prevent users from submitting several times by clicking quickly on the button.
<button type="submit" onclick="this.disabled=true;this.value='Sending, please wait...';this.form.submit();" class="btn btn-primary" align="right">Submit</button>
After doing this addition, I noticed that the button is submitting two times instead of once. How can I fix this ?