[Pass-reset_script] Comparing data in formData works
This commit is contained in:
parent
44f635c008
commit
d1c46e152d
1 changed files with 5 additions and 1 deletions
|
@ -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 });
|
||||
});
|
Loading…
Reference in a new issue