From 773f87070de044dd8e213c07325fff10b2245d3c Mon Sep 17 00:00:00 2001 From: Val Bancer Date: Fri, 5 Jul 2024 16:48:09 +0200 Subject: [PATCH] Add 'form' attribute to the input element (#11) See https://github.com/dropzone/dropzone/issues/2300 --- src/dropzone.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/dropzone.js b/src/dropzone.js index aa4c23280..0f6f46a33 100644 --- a/src/dropzone.js +++ b/src/dropzone.js @@ -215,6 +215,7 @@ export default class Dropzone extends Emitter { } this.hiddenFileInput = document.createElement("input"); this.hiddenFileInput.setAttribute("type", "file"); + this.hiddenFileInput.setAttribute("form", this.element.id); if (this.options.maxFiles === null || this.options.maxFiles > 1) { this.hiddenFileInput.setAttribute("multiple", "multiple"); }