Script now extracts email from form

This commit is contained in:
eoghan.conlon 2023-08-07 18:27:45 +01:00
parent 776ed76ab0
commit 9e20464bbd

View file

@ -30,7 +30,10 @@
function formHandler(listener){ function formHandler(listener){
listener.preventDefault(); listener.preventDefault();
alert("this works"); const formData = new FormData(formEl);
const email = formData.get("email");
const object = {email: email};
alert(JSON.stringify(object));
} }
</script> </script>
</html> </html>