Multifield is adding an extra field in the next text field | Community
Skip to main content
New Participant
March 20, 2020
Solved

Multifield is adding an extra field in the next text field

  • March 20, 2020
  • 1 reply
  • 1833 views

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.

 Please find the storage of properties under  jcr:content

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Suraj_Kamdi

@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>

1 reply

Suraj_Kamdi
Suraj_KamdiAccepted solution
New Participant
March 20, 2020

@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>
New Participant
March 20, 2020

Hi Suraj,

 

Thanks for the update.

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