Fix form disabling upon submission
Turns out if you disable everything then nothing is sent!
This commit is contained in:
parent
7a8c9c1035
commit
a2579dbd6d
1 changed files with 1 additions and 4 deletions
|
@ -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
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue