Set default values for fields inside multifield in AEM Touch UI

Avatar

Avatar

nikhil1986

Avatar

nikhil1986

nikhil1986

10-02-2020

I want to set default values for fields inside coral ui multifield. I tried to use cq:template but not sure of how to set values for fields inside aem multifieds. Can anyone help me out with this?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

hamidk92094312

Employee

Avatar

hamidk92094312

Employee

hamidk92094312
Employee

12-02-2020

Answers (2)

Answers (2)

Avatar

Avatar

BrianKasingli

MVP

Avatar

BrianKasingli

MVP

BrianKasingli
MVP

11-02-2020

Hi @nikhil1986 

Adding the property "value" to your dialogue input fields would be your solution. 
Take a look at the example below:

 

 

<navigationLinks
   jcr:primaryType="nt:unstructured"
   sling:resourceType="granite/ui/components/coral/foundation/form/multifield"
   fieldLabel="Navigation Links">
   <field
      jcr:primaryType="nt:unstructured"
      sling:resourceType="granite/ui/components/coral/foundation/container"
      name="./navLinks">
      <items jcr:primaryType="nt:unstructured">
         <fieldset
            jcr:primaryType="nt:unstructured"
            jcr:title="Link"
            sling:resourceType="granite/ui/components/coral/foundation/form/fieldset">
            <items jcr:primaryType="nt:unstructured">
               <linkLabel
                  jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
                  fieldLabel="Link Label"
                  name="./linkLabel"
                  value="@@@@@@@INiTIAL VALUE GOES HERE@@@@@@@@"/>
            </items>
         </fieldset>
      </items>
   </field>
</navigationLinks>

 

 

 

I hope this helps!

Avatar

Avatar

santhosh_kumar6

Avatar

santhosh_kumar6

santhosh_kumar6

11-02-2020

Hi, Use "value" property for the fields to set the default values for the dialog fields.