Expand my Community achievements bar.

SOLVED

Multifield issue in touch ui dialog

Avatar

Level 1
Level 1

Hi,

My requirement was to migrate classic ui dialog to touch ui.

553_0-1667975416269.png

I have used granite multifield in touch ui, I given required properties to useful Links and contact Links.

But useful links showing required and submitting the dialog without giving values to the contact Links.

553_1-1667975760720.png553_2-1667975830060.png

Issue not in properties, having two multifields is issue here. Please help me regarding this issue. Thanks in advance.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Please refer to this blog: https://medium.com/activate-aem/create-multifield-dialog-in-aem-f3e4a616f041

 

It shows step-by-step details on how to create mutifield with multiple input elements


Aanchal Sikka

View solution in original post

5 Replies

Avatar

Community Advisor

@553 Could you check if the name attribute is different for both?

something like - 

name="./usefulLinks/linkText"

name="./usefulLinks/link"

 

name="./contactLinks/linkText"

name="./contact Links/linkText"

Avatar

Level 4

Hi @553 

 

Can you provide the dialog snippet for the multifield added for both fields ?

 

 

Avatar

Level 1
Level 1

<usefulLinks
jcr:primaryType="nt:unstructured"
jcr:title="usefullinks"
sling:resourceType="granite/ui/components/coral/foundation/well"
margin="{Boolean}true">
<items jcr:primaryType="nt:unstructured">
<multifield
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/multifield"
class="full-width"
composite="{Boolean}true"
fieldLabel="Useful Links">
<field
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/fieldset"
acs-commons-nested="JSON_STORE"
checkbox-multifield=""
name="./usefulLink">
<items jcr:primaryType="nt:unstructured">
<column
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<linkText
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/textfield"
fieldLabel="Link Text"
name="./linkText"
required="{Boolean}true"/>
<link
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/pathbrowser"
fieldLabel="Link"
name="./link"
required="{Boolean}true"
rootPath="/content"/>
<openLinkInNewWindow
granite:class="coral-Form-fieldwrapper"
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/checkbox"
name="./openLinkNewWindow"
text="Open in new window"
value="{Boolean}true">
<linkText
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldLabel="Link Text"
name="./linkText"/>
</openLinkInNewWindow>
</items>
</column>
</items>
</field>
</multifield>
</items>
</usefulLinks>

Avatar

Level 1
Level 1

<contactLinks
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/well"
margin="{Boolean}true">
<items jcr:primaryType="nt:unstructured">
<multifield
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/multifield"
class="full-width"
composite="{Boolean}true"
fieldLabel="Contact Links">
<field
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/fieldset"
acs-commons-nested="JSON_STORE"
checkbox-multifield=""
name="./contactLink">
<items jcr:primaryType="nt:unstructured">
<column
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<linkText
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldLabel="Link Text"
name="./linkText"
required="{Boolean}true"/>
<link
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/pathbrowser"
fieldLabel="Link"
name="./link"
required="{Boolean}true"
rootPath="/content"/>
<openLinkInNewWindow
granite:class="coral-Form-fieldwrapper"
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/checkbox"
name="./openLinkNewWindow"
text="Open in new window"
value="{Boolean}true"/>
</items>
</column>
</items>
</field>
</multifield>
</items>
</contactLinks>

Avatar

Correct answer by
Community Advisor

Please refer to this blog: https://medium.com/activate-aem/create-multifield-dialog-in-aem-f3e4a616f041

 

It shows step-by-step details on how to create mutifield with multiple input elements


Aanchal Sikka