Excluding invisible form elements from FormData object
As @anthonyGist has pointed out in the comments, set invisible elements to disabled:
$(':hidden').prop('disabled', true);
As @anthonyGist has pointed out in the comments, set invisible elements to disabled:
$(':hidden').prop('disabled', true);