JQuery – Appending new varibvalre to Serialize

 var formData = $(‘#contact_form’).serializeArray();

formData.push({ name: "<something>", value: "<somevalue>" });
submitForm(formData);




var formdata = $('#post-form').serializeArray();
formdata.push({ name: "action", value: "create_post_shortcode" });
console.log(formdata);


Leave a Comment

Your email address will not be published. Required fields are marked *