Answers for "Disable Multiple Form Submits with Vanilla JavaScript"

2

Disable Multiple Form Submits with Vanilla JavaScript

var form = document.getElementById('formID');
var submitButton = document.getElementById('submitID');

form.addEventListener('submit', function() {

   // Disable the submit button
   submitButton.setAttribute('disabled', 'disabled');

   // Change the "Submit" text
   submitButton.value = 'Please wait...';
			
}, false);
Posted by: Guest on May-16-2020

Code answers related to "Disable Multiple Form Submits with Vanilla JavaScript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language