Skip to main content
New Participant
March 1, 2023

AEM cloud - custom node/property hide in the dialog

  • March 1, 2023
  • 4 replies
  • 2615 views

Hi Team,

I need to hide a few custom nodes in the dialog. sling:hideResource is not working since the fields are custom. Could someone suggest how to hide few fields & set default values to send it in the json please?

 

Thank you

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

4 replies

Kiran_Vedantam
New Participant
March 1, 2023

Hi @lakshmi9 

 

You can write custom JS to hide the dialog field you want.

 

Hope it helps!

Thanks,
Kiran Vedantam.

Lakshmi9Author
New Participant
March 1, 2023

Hi All,

Thank you all for the replies. I tried few approaches that has mentioned in the comments above but no luck.

I tried to add granite:class hide. It worked for me as expected.

 

Hope this would help for others.

 

Thank you!

arunpatidar
New Participant
March 1, 2023

try adding below if you are using coral3 

granite:hidden=true

The HTML hidden attribute.

 

 

https://developer.adobe.com/experience-manager/reference-materials/6-5/granite-ui/api/jcr_root/libs/granite/ui/docs/server/commonattrs.html 

 

or try adding granite:class="hide"

Arun Patidar
krishna_sai
New Participant
March 1, 2023
cwalter-1
New Participant
March 1, 2023

If you search for "aem dialog show hide" you will find a lot of examples on the web. One of them that looks a bit old though but might still be working is this one:

 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager-blogs/show-hide-cq-dialog-fields-based-on-drop-down-selection-in-aem/ba-p/563950

Lakshmi9Author
New Participant
March 1, 2023

Hi @cwalter-1 

it's not show/hide, i want to hide fields in the dialog.

ex: hidden boolean true 

but its not working on cloud.

 

Any other recommendations please?

cwalter-1
New Participant
March 1, 2023