I have a form data like this
var formData = new FormData($(this)[0]);
(inside a on submit fonction)
I would like to get the value of a parameter inside this formData.
For example in a sign up form,
formData.name
It’s undefined.
Thanks !
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
FormData is a ‘one way’ object to prepare a request. You can only append data. If you want to get data from a specific field in the form, you will need to use val() like this: