Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Customization on Content Fragment Add multifield contain 3 text field in CF [AEM6.5]

Avatar

Level 2

Hi Team,
I need reference where I want to add a custom multifield which contain [3 text field] in content fragment.
I came across some good documentation

But I am not able to add multifield which contain [3 text fields] in Content Fragment :

Like I want to include multifield

{
    "jcr:primaryType": "nt:unstructured",
    "colors": {
        "jcr:primaryType": "nt:unstructured",
        "composite": true,
        "fieldLabel": "Colors",
        "sling:resourceType": "granite/ui/components/coral/foundation/form/multifield",
        "fieldDescription": "Click 'Add field' to add a new color",
        "granite:data": {
            "jcr:primaryType": "nt:unstructured",
            "item-limit": "2"
        },
        "field": {
            "jcr:primaryType": "nt:unstructured",
            "name": "./colors",
            "sling:resourceType": "granite/ui/components/coral/foundation/container",
            "items": {
                "jcr:primaryType": "nt:unstructured",
                "color": {
                    "jcr:primaryType": "nt:unstructured",
                    "name": "color",
                    "fieldLabel": "Color",
                    "sling:resourceType": "granite/ui/components/coral/foundation/form/textfield",
                    "fieldDescription": "Fill in a hex value: # and 6 characters"
                },
                "color2": {
                    "jcr:primaryType": "nt:unstructured",
                    "name": "color2",
                    "fieldLabel": "Color2",
                    "sling:resourceType": "granite/ui/components/coral/foundation/form/textfield",
                    "fieldDescription": "Fill in a hex value: # and 6 characters"
                },
                "color3": {
                    "jcr:primaryType": "nt:unstructured",
                    "name": "color3",
                    "fieldLabel": "Color3",
                    "sling:resourceType": "granite/ui/components/coral/foundation/form/textfield",
                    "fieldDescription": "Fill in a hex value: # and 6 characters"
                }
            }
        }
    }
}

 

Please let me know the way to achieve this.

 

Thank you !

 

@kautuk_sahni  @arunpatidar  @lukasz-m  @EstebanBustamante 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
3 Replies

Avatar

Level 4

@Marcos_aem Can you provide more info regarding how do you want to expose the above mentioned multifield ?

If its at component level - there is a way we can achieve it

Avatar

Correct answer by
Community Advisor

Avatar

Administrator

@Marcos_aem Did you find the suggestions from users helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!



Kautuk Sahni