Expand my Community achievements bar.

Help with script

Avatar

Level 7

How with a script I can make a field to became READ ONLY?

I have DDList and I like when the value from DDL is e.g. 12 the Field A to force to read only.

Thank you

3 Replies

Avatar

Level 10

In the Exit event of the DDList

Language JavaScript

if (DDList.rawValue == "12")

     FieldA.access = "readOnly";

Thanks

Srini

Avatar

Level 10

You use .access to control those properties.

fieldName.access = "readOnly";

The other options are "protected" and "open".

Avatar

Former Community Member

In the exit event of the DDlist you woudl code something like this:

if (this.rawValue == "12"){

     FieldName.access = "readOnly"

} else {

     FieldName.access = "open"

}