Expand my Community achievements bar.

Setting access='readOnly' doesn't turn validation off ?

Avatar

Former Community Member
Hello



I have a TextField and set its type to "User Entered - Required" at design time and later, I programmatically set the access to readOnly. The TextField becomes read only but the validation is still active when I submit the form.



Is this behavior by design?

I have to change its validation property inactive explicitly? Something like TextField.validate.nullTest = 'disabled' ?



Any idea?



Thanks
2 Replies

Avatar

Former Community Member
Yes, you should do:



TextField.mandatory = "disabled";

TextField.access = "readOnly";



Chris

Adobe Enterprise Developer Support