Nested Multifield within multifield in content fragment model not working in aem .
Want a multifield inside multifield in content fragment model , have tried with custom js and dialog but still not working any idea please share it .
Want a multifield inside multifield in content fragment model , have tried with custom js and dialog but still not working any idea please share it .
Define the outer multifield: In your Content Fragment Model, define the outer multifield as you normally would.
{
"title": "My Multifield",
"name": "./myMultifield",
"fieldLabel": "My Multifield",
"xtype": "multifield",
"addLabel": "Add Item",
"fieldConfig": {
"xtype": "textfield",
"name": "./myTextField",
"fieldLabel": "My Text Field"
}
}
Define the inner multifield: In the fieldConfig object of the outer multifield, define the inner multifield as a custom xtype. For example:
{
"title": "My Multifield",
"name": "./myMultifield",
"fieldLabel": "My Multifield",
"xtype": "multifield",
"addLabel": "Add Item",
"fieldConfig": {
"xtype": "custommultifield",
"name": "./myCustomMultifield",
"fieldLabel": "My Custom Multifield"
}
}
Define the custom xtype: In your Content Fragment Model's client library, define the custom xtype for the inner multifield. For example:
CQ.Ext.define("myproject.CustomMultifield", {
extend: "CQ.form.MultiField",
constructor: function(config) {
config = config || {};
var defaults = {
"fieldConfig": {
"xtype": "textfield",
"name": "./myInnerTextField",
"fieldLabel": "My Inner Text Field"
}
};
config = CQ.Util.applyDefaults(config, defaults);
myproject.CustomMultifield.superclass.constructor.call(this, config);
}
});
Include the client library: In your Content Fragment Model's dialog, include the client library that defines the custom xtype. For example:
<cq:dialog
...
<cq:includeClientLib categories="myproject.custommultifield"/>
...
</cq:dialog>
https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/nested-multifield-in-content-fragment-aem-6-5/m-p/421857
https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/multifield-in-content-fragment-model/td-p/246514
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.