This commit is contained in:
Ross
2021-01-23 17:13:47 +00:00
parent 4164bf5a96
commit 38577a1178
+9 -13
View File
@@ -156,24 +156,20 @@
}); });
// Hook into the form submission
function processForm(e) {
console.log("SUBMIT")
if (e.preventDefault) e.preventDefault();
function ifNormal(){
if (document.getElementById("id_normal").checked){ if (document.getElementById("id_normal").checked){
$("#answer_form_set textarea").attr("required", false) $("#answer_form_set textarea").attr("required", false)
}
return false;
}
var form = document.getElementById('rapid-form');
if (form.attachEvent) {
form.attachEvent("submit", processForm);
} else { } else {
form.addEventListener("submit", processForm); $("#answer_form_set textarea").attr("required", true)
} }
}
$("#id_normal").change(() => ifNormal());
ifNormal();
}); });