Expand my Community achievements bar.

Protecting a field

Avatar

Level 4

Hi All,

I do have a field on a form I am working on, and the field name is  No_of_Files which is set to read only at design time, and is dependent on a Check box, named No_of_FilesChkBox.

I wrote the following code, and for some reason it is not working. Please, can someone tell me what is wrong.

if(No_of_FilesChkBox.rawValue==1){

   No_of_Files.protected=false;

}

else{

        No_of_Files.protected=true;

}

Thanks

LP

2 Replies

Avatar

Level 6

Hello,

if ur trying on exit event script will be like this,

if(No_of_FilesChkBox.rawValue==1){
   No_of_Files.access ="open";
}
else{
   No_of_Files.access="protected";
}

if u want this on change event script needs to modify.

replace the No_of_FilesChkBox.rawValue with xfa.event.newText

Hope this will help.

RAGHU.

Avatar

Level 4

Thanks, Raghu, that was helpful.