Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

[AEM Gems Webinar] Accelerating Experience Manager as a Cloud Service development with Rapid Development Environments

how to store multifield nodes as JSON in aem 6.5 (coral 3) ?


Level 2
6 Replies


Level 2

Hey thanks for reply but that way it's will be stored as an array like comma separated 


Community Advisor


OOTB the coral multifield stoored values as node. You have to write your own logic to store the multifield as json but you can read it from Node as well. YOu can check some old thread with the same queries.



Level 2

I have fixed by jqury dialog logic i will capture multifield data and concert into json and store into text field please refer below code 


console.log("client multifields....");
(function(document, $, ns) {
"use strict";
$(document).on("click", ".cq-dialog-submit", function(e) {
var attributelist =$("input[name='./fname']").attr("data-attribute1").split(",");

var parentlabel = "./"+ $("input[name='./fname']").attr("data-parentlabel");

var $formminmax = $(this).closest("");

var field = $formminmax.find("[data-granite-coral-multifield-name='"+parentlabel+"']");
var totalLinkCount = field.children('coral-multifield-item').length;
var test = field.children('coral-Form-fieldwrapper').name;

var jsonObj = [];

for (var i = 0; i < totalLinkCount; i++) {
var item = {}

for (var j=0; j < attributelist.length; j++) {
var itemname = './bookdetailswithmap/item'+i+'/./'+attributelist[j];
item [attributelist[j]] =field.find($("[name='"+itemname+"']")[0]).val();
var obj2 = {"parentlabel": jsonObj };
})(document, Granite.$,;


Level 1

Thanks!, this is great help, Can you please share the component structure as well.