Message from JavaScript discussions

May 2019

— I don't want to directly send the data to backend


I have to pass the form data as an object to a function...and that function will convert to json and signature creation will done there ..then after data with signature will send to backend

— So I want to take the form data in front end

— How can I take it

— You probably want FormData API

— const myForm = document.querySelector('#form');
const fd = new FormData(myForm);
for (const [ key, value ] of fd) {
console.log(key, value);

Message permanent page

— Try this

— Should log every checked box

— Let me try

— Nothing shows

— Are you running this code before checking any boxes?

— No