read only feature in AEM forms | Programatically

vkeerthy

15-10-2015

Hi Team,

Could you please advise how to set a form field as ready only on initialisation. Yes, definitely providing "false" in access expression helps the situation but I would like to know how I can achieve this through my custom javascript init.

Example: I have a field called applicantName which is my form element ID and I want this to be ready only on form initialisation (Under initialisation script in guideRootPanel).

 

For some reason, I couldn't find enough information on this in JS API document. Thanks!

Accepted Solutions (0)

Answers (2)

Answers (2)

deepak_k_

Employee

18-10-2015

Hi Varun,

You could use enabled property of the field component[0] and set it to false in initialize expression. Though, there is no such property at panel level at the moment and you need to set the enabled to false for each field of that panel.

Deepak

 

 

[0]: https://helpx.adobe.com/aem-forms/6/javascript-api/Field.html#enabled