Creating multi filed block model definitions in EDS Universal editor | Community
Skip to main content
Level 2
October 27, 2024
Question

Creating multi filed block model definitions in EDS Universal editor

  • October 27, 2024
  • 3 replies
  • 1601 views

Hi All,

 

Can someone please guide on how to create multifiled button in block model.

 

I want to create tease block with multifield button. Need two property for button link and button title same way how we can do in AEM component. 

I didn’t find any documentation to achieve this. 

 

Regards

Sofiyan

 

 

3 replies

ShaileshBassi
Community Advisor
Community Advisor
November 27, 2024

Hi @sofiyans8042875 

You can create a block (Buttons) and blockItem (Button)

{ "definitions": [ { "title": "Buttons", "id": "buttons", "plugins": { "xwalk": { "page": { "resourceType": "core/franklin/components/block/v1/block", "template": { "name": "Buttons", "filter": "buttons" } } } } }, { "title": "Button", "id": "button", "plugins": { "xwalk": { "page": { "resourceType": "core/franklin/components/block/v1/block/item", "template": { "name": "Button", "model": "button" } } } } } ], "models": [ { "id": "button", "fields": [ { "component": "richtext", "name": "text", "value": "", "label": "Text", "valueType": "string" } ] } ], "filters": [ { "id": "buttons", "components": [ "button" ] } ] }

Then post this you can write the logic in your class i.e. buttons.js to fetch all the child elements of the blockItem i.e. button and render it as per the desired HTML.

Hope this helps!

Thanks

HemanthSreenu
Level 2
July 18, 2025

Hi @sofiyans8042875 , Although I'm still working on the JS, I was able to get the dialog structure. Adding the reference link as well. Good luck!

 

https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/developing/universal-editor/field-types

{
"component": "container",
"name": "test",
"label": "Multi Text",
"multi": true,
"fields": [
{
"component": "reference",
"name": "image",
"value": "",
"label": "Sample Image",
"valueType": "string"
},
{
"component": "text",
"name": "alt",
"value": "",
"label": "Alt Text",
"valueType": "string"
}
]
}

New Member
November 4, 2025

@hemanthsreenu ,

I used the same JSON structure you shared, but after authoring, when I try to consume the data in the block object, it’s returning an empty div.

Did you face a similar issue or find a workaround for this?

HemanthSreenu
Level 2
November 18, 2025

Hey @srinivasuko,

 

We ran into issues with this structure. UI was fine, we were seeing multi fields but the data is not being stored as expected. Upon further debugging, got to know that composite multifield is not supported currently in EDS.

September 10, 2025

@shaileshbassi and how can I make a button pre-added to the block, with Lorem content?

HemanthSreenu
Level 2
September 18, 2025

You can add the property name and value under template section in the definitions. Like below.

 

{ "title": "Button", "id": "button", "plugins": { "xwalk": { "page": { "resourceType": "core/franklin/components/block/v1/block/item", "template": { "name": "Button", "model": "button", "text": "Lorem Ipsum" } } } } }

 

November 17, 2025

thanks, this "template" hint helped me.
is there a document for this ?