Stuck with local reference error in validateForm and submitForm functions in newForm.js