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 Gems Webinar] Accelerating Experience Manager as a Cloud Service development with Rapid Development Environments
SOLVED

Script to Show Hide

Avatar

Level 4

Hi

I'm looking for documentation or an example of a field Visibility Expression.  Is there a help page online?

Thanks

1 Accepted Solution

Avatar

Correct answer by
Level 3

Visibility Expression is used to control the visibility of field/panel. The return value of visibility expression should be a boolean(true/false), where true says that the component should be visible and false says that it should be hidden.

Suppose, you have two fields A and B and say, you want to control the visibility of A based on the value present in B. In such case, the visibility expression would look like this,

// suppose we want to make the field A visible only when the value of // field B is set to "female", then the visibility expression of field A // would look something like this B.value === "female"

Also, with the expression above, the initial visibility of field A would be hidden, assuming that B.value is not set to "female" initially.

Visibility Expression can be found in field/panel dialog configuration.

The "help page" for all the "expression" supported would be available soon.

View solution in original post

0 Replies

Avatar

Correct answer by
Level 3

Visibility Expression is used to control the visibility of field/panel. The return value of visibility expression should be a boolean(true/false), where true says that the component should be visible and false says that it should be hidden.

Suppose, you have two fields A and B and say, you want to control the visibility of A based on the value present in B. In such case, the visibility expression would look like this,

// suppose we want to make the field A visible only when the value of // field B is set to "female", then the visibility expression of field A // would look something like this B.value === "female"

Also, with the expression above, the initial visibility of field A would be hidden, assuming that B.value is not set to "female" initially.

Visibility Expression can be found in field/panel dialog configuration.

The "help page" for all the "expression" supported would be available soon.