I’m collecting all data from form input fields with serialize() function. But it doesn’t include submit button value even if I pressed submit button. How to push form name into POST data (IN my case i wanna push form name into formData variable)?
The code looks like that
$("#signup_form").submit(function () {
var form = $(this),
formData = form.serialize(),
formUrl = form.attr('action'),
formMethod = form.attr('method');
....
Append it to the query string generated by
serializeI guess. I’m not quite sure what you’re doing with the form data in the rest of your function, full code may help, but the snippet below is probably sufficient.