Expand my Community achievements bar.

SOLVED

disable richtext rte field

Avatar

Level 3

Hi,

 

How to conditionally disable the richtext field in the dialog using jQuery? (rte created using sling:resourceType - cq/gui/components/authoring/dialog/richtext)

 

I have a checkbox. when this checkbox is checked, richtext field in the dialog needs to be disabled 

 

Thanks in advance

1 Accepted Solution

Avatar

Correct answer by
Level 5

Below is the link which explains step by step logic for hiding and showing a field in the dialog using extra Jquery logic which can be replicated to your usecase as well.

https://stackoverflow.com/questions/25244844/conditional-show-hide-of-fields-in-aem-6-dialogs

Hope this is useful

View solution in original post

5 Replies

Avatar

Community Advisor

@Dolly you can use editable templates, it's policy to remove the RTE from being available components to use in the template.

Avatar

Community Advisor

use extra clientlibs to load your jquery on the dialog and you can manipulate the logic however you want.

-Sravan

Avatar

Correct answer by
Level 5

Below is the link which explains step by step logic for hiding and showing a field in the dialog using extra Jquery logic which can be replicated to your usecase as well.

https://stackoverflow.com/questions/25244844/conditional-show-hide-of-fields-in-aem-6-dialogs

Hope this is useful

Avatar

Community Advisor

@Dolly I believe, you can just create a custom dialog clientlib, and write your JQuery for the same and include that in the extraclientlib node of the dialog which will solely load the clientlib to your component. 

eg:

https://stackoverflow.com/questions/57992806/how-to-show-hide-dialog-fields-with-a-checkbox-in-aem-t...