From: Vincent Vanwaelscappel Date: Mon, 2 Mar 2020 16:08:28 +0000 (+0100) Subject: wip #3448 @1.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=968cd08f7fae92d08087ef7ba94db727e3ce1152;p=cubist_cms-back.git wip #3448 @1.5 --- diff --git a/src/public/bunchmultiple/bunchmultiple.js b/src/public/bunchmultiple/bunchmultiple.js index f856fab..3a448f6 100644 --- a/src/public/bunchmultiple/bunchmultiple.js +++ b/src/public/bunchmultiple/bunchmultiple.js @@ -68,8 +68,8 @@ var val = []; var $this = this; var id = this.element.attr('id'); - $.each(this.element.find('.item' + this.bmidselector + ':not(.sample) .subform'), function () { - var data = $(this).find(':input').serializeArray(); + $.each(this.element.find('.item' + this.bmidselector + ':not(.sample) .subform'+ this.bmidselector), function () { + var data = $(this).find(':input' + $this.bmidselector).serializeArray(); var filteredData = {}; $.each(data, function (k, v) { var name = v.name.replace(id + '___', ''); @@ -79,6 +79,7 @@ val.push(filteredData); }); + console.log(val); this.element.find('.hiddenfield' + this.bmidselector).val(JSON.stringify(val)); },