If you want to disable a submit button once it has been clicked, to prevent double clicking and/or double form submission. You can use the below code snipet, as the onclick value as seen in the snipet, to disable the button once clicked, update the button text to a notice for the end user, and finally submit the form.
onclick="this.disabled=true;this.value='Submitting form, please be patient...';this.form.submit();"