I\'m trying to create a form that allows a user to fill out data and if an option is checked a div opens up and the user has the option to upload a file along with their sub
you can do this using FormData. try this
$("form#data").submit(function() { var formData = new FormData($(this)[0]); $.post($(this).attr("action"), formData, function(data) { alert(data); }); return false; }); // HTML Submit