Quantcast
Viewing all articles
Browse latest Browse all 82585

Show/Hide fields based on checkbox

A common question I know, however I am having an issue with the field labels.

 

The PDF form was created with FormsCentral and then edited locally with Acrobat XI (version 11.0.10) on Windows 7 Pro.

 

The PDF has a checkbox to allow the user to enter a separate shipping address. In the checkbox properties, Actions tab, I have Mouse Up as the trigger and the following JavaScript.

 

var nHide = event.target.isBoxChecked(0)?display.visible:display.hidden;

this.getField("SHIPPING ADDRESS").display = nHide;

this.getField("CITY_2").display = nHide;

this.getField("STATE / PROVINCE_2").display = nHide;

 

this works well, however the field labels remain visible in the PDF regardless of the visible / hidden state.

 

How can I hide the field labels along with the fields themselves when the checkbox remains unchecked?

 

Thanks,

bw200


Viewing all articles
Browse latest Browse all 82585

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>