Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

read only feature in AEM forms | Programatically

vkeerthy
Level 3
Level 3

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!

2 Replies
deepak_k_
Employee
Employee

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

vkeerthy
Level 3
Level 3

Thanks Deepak. That helps for the requirement that I am after.