addEventListener not working on a form - vanilla JS
Is the JS loading before your HTML? So JS can't find #new_test_form. Try wrapping your JS code in:
document.addEventListener("DOMContentLoaded", function(event) {
//do work
});
Is the JS loading before your HTML? So JS can't find #new_test_form. Try wrapping your JS code in:
document.addEventListener("DOMContentLoaded", function(event) {
//do work
});