Skip to main content
Level 3
February 17, 2023
Solved

disable richtext rte field

  • February 17, 2023
  • 4 replies
  • 1818 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by VeenaK

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

4 replies

BrianKasingli
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
February 17, 2023

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

DollyAuthor
Level 3
February 17, 2023

Hi @briankasingli,

Edited my query to give more clarity. Thanks!

B_Sravan
Community Advisor
Community Advisor
February 18, 2023

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

-Sravan

VeenaKAccepted solution
Level 4
February 18, 2023

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

Manu_Mathew_
Community Advisor
Community Advisor
February 20, 2023

@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-touch-ui