From 968cd08f7fae92d08087ef7ba94db727e3ce1152 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Mon, 2 Mar 2020 17:08:28 +0100 Subject: [PATCH] wip #3448 @1.5 --- src/public/bunchmultiple/bunchmultiple.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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)); }, -- 2.39.5