Hide and Show in Content Fragments | Community
Skip to main content
Prashardan
Level 4
March 20, 2025
Solved

Hide and Show in Content Fragments

  • March 20, 2025
  • 2 replies
  • 945 views

Hi Team

 

I have one requirement where I have to create a Content Fragment Model which contains checkbox/dropdown based on the selection of value in the checkbox/dropdown there should be 2 fields which should be visible or hide.

 

Kindly advise how can I achieve this in content fragments.

 

Thanks in advance.

Best answer by PRATHYUSHA_VP

Hi @prashardan 

 

There is no OOTB functionality to implement checkbox/dropdown show-hide functionality in content fragments. 

You need to write a custom script for the functionality similar to how we implement for AEM CQ dialog. Identify the JS client libraries associated with content fragments, and load your custom script based on that.

 

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

 

Hope this helps

 

Thanks 

2 replies

PRATHYUSHA_VP
Community Advisor
PRATHYUSHA_VPCommunity AdvisorAccepted solution
Community Advisor
March 21, 2025

Hi @prashardan 

 

There is no OOTB functionality to implement checkbox/dropdown show-hide functionality in content fragments. 

You need to write a custom script for the functionality similar to how we implement for AEM CQ dialog. Identify the JS client libraries associated with content fragments, and load your custom script based on that.

 

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

 

Hope this helps

 

Thanks 

Prashardan
Level 4
March 25, 2025

Thanks @prathyusha_vp  I was able able to achieve this requirement by writing custom js script.