Open Baayeh opened 1 year ago
On line 151, the form selector to get the value of the email field is missing the value of the name attribute associated with the field. Replace
const email = contactForm.elements.value;
withconst email = contactForm.elements.email.value;
to be able to grab the value of the email field and assign it to the email variable. The value grabbed can now be used in the if statement on the next line and the form can be submitted with the correct feedback.
Bug: TypeError
Cannot read properties of undefined (reading 'toLowerCase')