Message from JavaScript discussions

April 2019

— Try THIS!

— 

const form = document.querySelector('#form');

submit.addEventListener('click', e => {
e.preventDefault();

const fd = new FormData(form);

const data = [ ...fd.entries() ]
.reduce((acc, [ key, value ]) =>
({ ...acc, [key]: value }), {});

console.log(data);

return false;
});

— Should handle most input types I bet

— Wow interesting

— The previous version gave me something

— Bad news TRGWII it gives me just last input

— Post HTML and results

— Looks too abstract for me to change it

— With git, this wouldn't be an issue :P

— And the HTML?

— Text field for gender? Disappointed :P

— And the HTML?