![]() ![]() The first part of this code, event.target, refers to the target of the event, which is the Check Box. The first line determines the visibility by examining the state of the check box with the (0) function. This.getField("ShippingStreet").display = nHide This.getField("LblShippingStreet").display = nHide This.getField("LblShippingInfo").display = nHide var nHide = (0)?display.visible:display.hidden The Mouse Down event would not work because it happens before the Check Box value is changed. This particular event is used because it happens after the value of the Check Box has been updated. The easiest approach is to use the Mouse Up event for the Check Box. For this sample, multiple fields receive the change, but only a single field (the Check Box) is used as the trigger. Which location is best depends on the specific situation. In general, there are two locations where the visibility code can be placed in the field that triggers the visibility change or the field that receives the visibility change. The field labels are really read-only text fields. Notice that not only are the entry fields made visible, but visibility of the field labels is also controlled. In the first example of the sample file a check box is used to display a set of fields for entering additional info. When checked, some other fields are made visible and when unchecked the fields are hidden. Probably the simplest case for setting field visibility is a single check box. Display constantsĪcrobat provides a set of constants in the display object so you don’t have to remember which integer value corresponds to which field display option.Īll examples are provided in Sample_ShowHideFields.pdfĭownload Setting Field Visibility based on a Single Check Box Setting Basically, always use the display property. Otherwise, stick with the display property. These properties are intended to be used only for scripts that will be viewed in the version of Acrobat preceding deprecation, which happens to be version 3.0. However, lots of documents had already been created using these properties so they left them in the DOM until such time they feel it’s ok to remove them in a future version. This means that Adobe re-thought how they had set up these properties and decided to change it. 3 Field Hidden in Viewer, Visible on Printed DocumentĪs noted in the table, the first two properties are deprecated.2 Field Visible in Viewer, Hidden on Printed Document.1 Field Hidden in Viewer and in Printed Document.0 Field Visible in Viewer and Printed Document.Integer Value Replaced hidden and print in Acrobat version 4.0 ![]() true Field Displayed in Printed Document.Deprecated Property May be removed in future versions of Acrobat ![]()
0 Comments
Leave a Reply. |