I am having problem that when i am trying to submit the form by clicking on the submit button it takes some time to post request during this if i am again click on the Submi
Best way I found this to work best is if all information is correct on the form then add the attribute to the submit button. Incase user needs to comeback and fill out form again with correct information.
document.querySelector('.btn').addEventListener('submit',function(){
if(input.value){
this.setAttribute("disabled", "true")
}
};