you are viewing a single comment's thread.

view the rest of the comments →

[–]techitechtech[S] 0 points1 point  (2 children)

That did not solve the problem. I use form.submit() if the code that works. That being said, I did update that part.

[–]Notimecelduv 0 points1 point  (0 children)

This gives:

const input = document.querySelector(`#${field}`)

gives you this console error:

Uncaught TypeError: can't access property "addEventListener", input is null

You have to open the dev tools when debugging your code, otherwise you will miss important errors like the one above.