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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Calculate event disables a subform

Aditya_S_
Level 7
Level 7
My form has a subform with a fiew textfields and dropdowns and I have entered JS in the calculate event of the subform. While I was testing the form, I removed the JS from the subform, saved the form, and pasted the same code back to the calculate event of the subform.



This sets all the fields access to be protected or read only. I thought my form may be corrupted but I could replicate the same issue on a new form.



To replicate the issue



1) Insert a textfield in the subform

2) In the calculate event of the subform enter textField1.access = "protected";

3) PDF preview it. You will find the textfield disabled

4) Remove the JS from the calculate event. PDF preview it

5) The textfield is disabled, without any code in the form.



Can anyone suggest why this issue occurs ? Is this a bug ?



Aditya
4 Replies
pguerett
Level 10
Level 10
I tried this and did not have the issue ....
Aditya_S_
Level 7
Level 7
Can you have a look at my sample form which has no JS and and I cannot enter any text in the field ?
masi_p
Level 1
Level 1

We have experienced the same problem. It seems that this doesn't occur on Designer 8.0/Acrobat 8 but with Designer that comes with Acrobat 9 (Designer ES?), this happens every time you add script to the calculate event of the subform. I believe that when you add a script to the calculation event, the Designer adds access="readOnly" to the subform itself, so all its children becomes disabled. Once again, on Acrobat 8 this doesn't effect at all but on Acrobat and Reader 9 all childrens of the subforms are unaccessible.

If you encounter thsi problem, check the XML source of the subform. If it has access="readOnly", remove it.

<subform layout="lr-tb" minH="17mm" name="someSubform" w="170mm" access="readOnly">

In my opinion, this seems like a bug and should be fixed on next release.

EDIT: I think this problem occurs only, if the form is saved as dynamic so static forms doesn't have the same effect.