Fix form disabling upon submission

Turns out if you disable everything then nothing is sent!
This commit is contained in:
William Brawner 2024-03-30 11:30:10 -06:00
parent 7a8c9c1035
commit a2579dbd6d

View file

@ -3,9 +3,6 @@ const forms = document.getElementsByTagName('form')
for (let i = 0; i < forms.length; i++) {
const form = forms[i]
form.onsubmit = () => {
const inputs = form.getElementsByTagName('input')
for (let j = 0; j < inputs.length; j++) {
inputs[j].disabled = true
}
form.querySelector('input[type="submit"]').disabled = true
}
}