Using Granite condition to make the field read-only

Avatar

Avatar

test1234567

Avatar

test1234567

test1234567

11-01-2021

Hello All - I have a use-case to make the checkbox readonly in a dialog based on sling:resourceType using granite:RenderCondition. Can someone advise on this?

View Entire Topic

Avatar

Avatar

kunal23

MVP

Avatar

kunal23

MVP

kunal23
MVP

11-01-2021

You can hide a check box using a render condition and not make it read only. Render conditions are evaluated server side by Granite UI framework to show or hide a UI component. 

You can write a custom render condition to hide the checkbox based on the resource type. For more details see the following blog- http://www.nateyolles.com/blog/2016/07/aem-granite-custom-render-conditions