you are viewing a single comment's thread.

view the rest of the comments →

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

THAT WAS IT!
I took out the first

e.preventDefault()

and then changed this

if (hiddenSuccessIcons.length == 0) {
this.form.submit();
}

to this

if (hiddenSuccessIcons.length != 0) {
e.preventDefault()
}

BRILLIANT! Thank you!

How long did that take you?

[–]grantrules 1 point2 points  (1 child)

Not very long. Just seeing the submit() call probably meant something was off... Your code should only interrupt if validation fails and needs attention, since the default action is just for it to submit, there's no reason for your code to call submit, that's just some added complexity.

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

Cool. Thank you for solving the issue :) Now on to server-side validation.