Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Leela-Pavan-Kumar
Leela-Pavan-KumarAccepted solution
Level 4
Mar 26, 2022 7:28 AM UTC

By Default the style Display is set to none for that field

 

If you set the Display attribute of style as Block using some script then by default it is in Expand mode.

 

5 replies

arunpatidar
Community Advisor
Community Advisor
Mar 25, 2022 1:02 PM UTC

Hi @prachi_mathur 
Please check https://developer.adobe.com/experience-manager/reference-materials/6-5/granite-ui/api/jcr_root/libs/granite/ui/components/coral/foundation/accordion/index.html

 

To disable, I guess by default it is collapsed, if you add active to item's parentConfig then it is active.

Translate
Arun Patidar
Leela-Pavan-Kumar
Level 4
Mar 26, 2022 5:28 AM UTC

Hi @prachi_mathur ,

 

Create a layout node under your items node and add sling:resourceType as granite/ui/components/foundation/layouts/collapsible.

 

<Collapsible
     jcr:primaryType="nt:unstructured"
     jcr:title="Collapsible Fields"
     sling:resourceType="granite/ui/components/foundation/container">
     <items jcr:primaryType="nt:unstructured">
         <Collapsenode
            jcr:primaryType="nt:unstructured"
            sling:resourceType="granite/ui/components/coral/foundation/form/fieldset">
            <items jcr:primaryType="nt:unstructured">
                   <title
                        jcr:primaryType="nt:unstructured"
                        sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
                        fieldLabel="Title"
                        renderReadOnly="{Boolean}true"/>
            </items>
         </Collapsenode>
    </items>
    <layout
          jcr:primaryType="nt:unstructured"
          sling:resourceType="granite/ui/components/foundation/layouts/collapsible"/>
</Collapsible>

 

 

Translate
Level 2
Mar 26, 2022 6:44 AM UTC

I tried this but it is not open by default ,I have to click on the Collapsible Fields then it is opened. 

Translate
Leela-Pavan-Kumar
Leela-Pavan-KumarAccepted solution
Level 4
Mar 26, 2022 7:28 AM UTC

By Default the style Display is set to none for that field

 

If you set the Display attribute of style as Block using some script then by default it is in Expand mode.

 

Translate