I\'ve a contact form that sends data to a PHP script via AJAX. It\'s pretty basic but I can\'t get input values with serialize. The form id is correct, i obtain the input name b
You have a syntax mistake when you use the jquery selector to a jquery object, when you select your form you must use it lately like this:
var form = $('#contact-form'); //and then use it directly in the ajax call like this
form.serialize(); // not $(form).serialize()
Here is your fiddle updated https://jsfiddle.net/ingemi/kbpnmptw/ you must use serialize directly in the ajax call