From: Alan Knowles Date: Wed, 25 Sep 2019 06:00:08 +0000 (+0800) Subject: Fix #6045 - use formdata to handle forms - testing with press release X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=f82889b9a1866c045141af3238da91787156abbc Fix #6045 - use formdata to handle forms - testing with press release --- diff --git a/Roo/form/BasicForm.js b/Roo/form/BasicForm.js index 5beb65a446..3e2d779534 100644 --- a/Roo/form/BasicForm.js +++ b/Roo/form/BasicForm.js @@ -538,6 +538,17 @@ clientValidation Boolean Applies to submit only. Pass true to call fo }, this); } + // use formdata + if (typeof(FormData) != 'undefined' && asString !== true) { + var fd = (new FormData(this.el.dom)).entries(); + var ret = {}; + var ent = fd.next(); + while (!ent.done) { + ret[ent.value[0]] = ent.value[1]; // not sure how this will handle duplicates.. + ent = fd.next(); + }; + return ret; + } var fs = Roo.lib.Ajax.serializeForm(this.el.dom); diff --git a/roojs-all.js b/roojs-all.js index 3731df19c7..2ad2d49b7a 100644 --- a/roojs-all.js +++ b/roojs-all.js @@ -1935,11 +1935,11 @@ Roo.MessageBox.confirm("Change requires confirmation",A.result.errorMsg,function i