All 3 validations are failing. The contact form, the right navigation, and then the unsubscribe form. They all use the same event handler. Could someone please help me get this fixed ASAP? I have server-side validation but this is the last thing holding me up…They WERE working not too long ago but I tinkered with some stuff.
Haha sorry I was rushing since I knew you were working on it. Here’s the long answer:
var myForm = document.getElementById("subscribe-form");
var myFormTwo = document.getElementById("contact-form");
var myFormThree = document.getElementById("unsubscribe-form");
var inputs = document.getElementsByTagName('input');
addEvent( myForm, 'submit', validateSubscribeForm );
addEvent( myFormTwo, 'submit', validateContactForm );
addEvent( myFormThree, 'submit', validateUnsubscribe );
myFormThree === null when you’re on contact.php, and myFormTwo === null when on unsubscribe.
The error on line 163 is Cannot read property 'addEventListener' of null for both, because one isn’t set on the other (hard to word this). You just have to check for null and you should be ok (you might need to do this in more than one place).