Expand my Community achievements bar.

Specific script not workig in dynamic forms

Avatar

Former Community Member
Dear all,



I have three check boxes.Third one is N/A.So when user select third one the value of first two check boxes should be null and acess should be read only.



So i have added the following script to click and change events of the third check box.



if(this.rawValue == 1 )

{

first.rawValue = 0 ;

second.rawValue = 0 ;



first.access = "readOnly" ;

second.access = "readOnly" ;

}



else

{

first.access = "open" ;

second.access = "open" ;

}



This is working fine if the form is save as static pdf but i need it in dynamic form.



In dynamic form if i select first two check boxes then i select third one it's only making the first two check boxes read only.But the values are not refreshed i.e. value should be 0.it should be deselected.



Can any one please help me to solve this problem.



Thanks a lot in advance



Regards

Rakesh
6 Replies

Avatar

Former Community Member
Hi Rakesh,



I have tried this out in Designer 7.1. I have placed the code ONLY in the change event of the 3rd checkbox and everything worked fine for me. It may have something to do with the code being on both events, I'm not sure.



Try it and let me know if you want me to post my solution.



Catherine

Adobe Systems

Avatar

Former Community Member
Dear Catherine,



Thanks for the response.There is no problem if we give it in both the events.Have you saved the form as dynamic form or not?



If it is working in dynamic form also then I think there may be poblem in Designer becoze I am usuing designer 7.0.



Regards

Rakesh

Avatar

Former Community Member
Rakesh,



I have tested this in both Designer 7.0 and Designer 7.1, saved both times as a dynamic form and it works for me with the following javascript code on the change event in the 3rd CheckBox:



if(CheckBox3.rawValue == 1 )

{

CheckBox1.rawValue = 0 ;

CheckBox2.rawValue = 0 ;



CheckBox1.access = "readOnly" ;

CheckBox2.access = "readOnly" ;

}



else

{

CheckBox1.access = "open" ;

CheckBox2.access = "open" ;

}



If you still don't get it to work I can send you the file that I have working.



Catherine

Adobe Systems

Avatar

Former Community Member
Dear Catherine,



Thanks a bunch for quick response



I am sorry to inform you that this script is not working for me.

If I select the first two check boxes and then I select the third one it's only making the first two check boxes as read only but the values are not refreshed.



One more thing I am usuing Reader 7.0.Is there any problem with this reader version?If you want I can send you the form where it is not working.Please help me to solve this problem.

Avatar

Former Community Member
Rakesh,



I have Reader 7.0.5 and it is working fine. I have attached my form so if you could try that and upgrade to Reader 7.0.5 it should work.



If you want to send me your file I can take a look at it if that doesn't work.



Catherine