コミュニティアチーブメントバーを展開する。

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

この会話は、活動がないためロックされています。新しい投稿を作成してください。

解決済み

How to enable configuration conditionally?

Avatar

Level 1

I have configuration which contains various fields. I want to enable one text field if above field (check box) is selected.I am not sure how can i do that without using any js.

1 受け入れられたソリューション

Avatar

正解者
Community Advisor

Hi,

What do you mean by configuration is it osgi configuration or design dialog configuration?

You can show hide field based on osgi config by using granite renderer, for e.g. 

https://aemlab.blogspot.com/2019/07/aem-granite-custom-render-conditions.html

 

if configuration in design dialog then you can do it by setting a property in the text field item in the dialog e.g.

granite:hide="${!cqDesign.chkboxprop}"

 

if you need to show hide filed based on dialog field within dialog then you must need to write js

 

Thanks

Arun

 

Arun Patidar

AEM LinksLinkedIn

元の投稿で解決策を見る

2 返信

Avatar

Employee Advisor

As per my understanding this has to be done via Javascript. You can only differentiate between configuration based on the runmodes. Example: config.author.dev Or config.publish.dev

 

Check [1] for more details.

 

[1] https://docs.adobe.com/content/help/en/experience-manager-65/deploying/configuring/configuring-osgi....

Avatar

正解者
Community Advisor

Hi,

What do you mean by configuration is it osgi configuration or design dialog configuration?

You can show hide field based on osgi config by using granite renderer, for e.g. 

https://aemlab.blogspot.com/2019/07/aem-granite-custom-render-conditions.html

 

if configuration in design dialog then you can do it by setting a property in the text field item in the dialog e.g.

granite:hide="${!cqDesign.chkboxprop}"

 

if you need to show hide filed based on dialog field within dialog then you must need to write js

 

Thanks

Arun

 

Arun Patidar

AEM LinksLinkedIn