diff --git a/themes/grav/js/forms/form.js b/themes/grav/js/forms/form.js index fc4855e0..d76852ab 100644 --- a/themes/grav/js/forms/form.js +++ b/themes/grav/js/forms/form.js @@ -171,9 +171,12 @@ this.form = $(el); this.form.data('grav-form-instance', this); this.form.on('submit', function (e) { - this.submit(this.ajax); - e.preventDefault(); - return false; + if (Form.findElements(this.form, 'input[type="file"]', '', false).length == 0) { + //Only process the form if it does not contain file elements, otherwise we cannot get $_FILES correctly + this.submit(this.ajax); + e.preventDefault(); + return false; + } }.bind(this)); this.scanned = false;