[Pass-reset_script] Comparing data in formData works

This commit is contained in:
eoghan.conlon 2023-07-27 18:00:54 +01:00
parent 44f635c008
commit d1c46e152d

View file

@ -16,6 +16,10 @@ const formEl = document.getElementById("reset");
formEl.addEventListener('submit', () => {
event.preventDefault();
const formData = new FormData(formEl);
const object = Object.fromEntries(formData.entries());
if(formData.get("newPW") === formData.get("newPWConfirm")){
alert("This works");
} else {
alert("Shit");
}
console.log({ object });
});