Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

AEM: Conditionally show or hide a field based on a Checkbox widget (or anything else) | AEM Community Seeding

kautuk_sahni
Community Manager
Community Manager

BlogImage.jpg

AEM: Conditionally show or hide a field based on a Checkbox widget (or anything else) by Theo Pendle

Abstract

How to create a generic system to show/hide, enable/disable or implement any kind of conditional logic in your edit dialogs

In a previous tutorial, I showed you how to leverage the OOTB show/hide functionality to conditionally display widgets in AEM TouchUI based on a drop-down select choice.

Unfortunately, this is the only way to conditionally show widgets in AEM using native features so in this tutorial, I will show you how we can re-create a similar functionality ourselves using a checkbox, or any other widget!

How it works
Here are some terms I’ve settled on:
1. Master: the value of this widget will determine the behavior of the slave widgets (eg: if the master is a checkbox and it is checked, a slave will be disabled)
2. Slave: these are the widgets that will react to a change in the master widget value.
3. Toggle: this is the combination of master, slaves and the JS function which updates the slaves when the master value is changed.

Read Full Blog

AEM: Conditionally show or hide a field based on a Checkbox widget (or anything else)

Q&A

Please use this thread to ask the related questions.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

0 Replies