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

SOLVED

Multifield is adding an extra field in the next text field

Avatar

Level 2

I have two multifields. Both are text fields but while adding values to the second text field it is taking an additional , as a first field of the  second multifield. is there any property i missing ?

Please find the structure of textfield under multifield.

Screenshot (224).png

 Please find the storage of properties under  jcr:content

crxlite.png

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@ravi_shankerj14 

Please use the following cq:dialog structure for multifield.

<nav
    sling:resourceType="granite/ui/components/coral/foundation/form/multifield"
    fieldLabel="Links"
    jcr:primaryType="nt:unstructured"
    composite="{Boolean}true">
    <field sling:resourceType="granite/ui/components/coral/foundation/container"
            jcr:primaryType="nt:unstructured" 
            name="./multifieldProperties">
        <items jcr:primaryType="nt:unstructured">
            <linkText
                sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
                fieldLabel="Link Text"
                jcr:primaryType="nt:unstructured"
                name="./linkText" />
        </items>
    </field>
</nav>

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

@ravi_shankerj14 

Please use the following cq:dialog structure for multifield.

<nav
    sling:resourceType="granite/ui/components/coral/foundation/form/multifield"
    fieldLabel="Links"
    jcr:primaryType="nt:unstructured"
    composite="{Boolean}true">
    <field sling:resourceType="granite/ui/components/coral/foundation/container"
            jcr:primaryType="nt:unstructured" 
            name="./multifieldProperties">
        <items jcr:primaryType="nt:unstructured">
            <linkText
                sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
                fieldLabel="Link Text"
                jcr:primaryType="nt:unstructured"
                name="./linkText" />
        </items>
    </field>
</nav>

Avatar

Level 2

Hi Suraj,

 

Thanks for the update.

But have a requirement to store multifield values as string[] under jcr:content node.