Skip to main content
Participating Frequently
Apr 10, 2025 10:27 AM UTC
Question

hide and show form field in page 2 based on a checked box in page 1

I am trying to have a form field show/hide on 'page 2' when a check box in 'page 1' is checked. Below will only work if on the same page - I have tested with multiple other fields 

 

if (event.target.value === "Off")  {

     this.getField("LOC ZIP").display = display.hidden;

} else {

     this.getField("LOC ZIP").display = display.visible;

}

 

HELP PLEASE 

16 replies

try67
Community Expert
Community Expert
Apr 10, 2025 3:40 PM UTC

Works fine for me... See attached.

Translate
Participating Frequently
Apr 10, 2025 4:13 PM UTC

i used VSC  and the code WORKed just fine thats not the problem I was running into but now I just need to remove it fully. Does Adobe have a bug that it holds desperately onto a javascript thats since been removed?

 

Translate
Dave Creamer of IDEAS
Community Expert
Community Expert
Apr 10, 2025 4:23 PM UTC

You were already asked "where did you put the script" 6 hours ago from this post. 

I put the script as an action on the checkbox. When I deleted the action, the script was deleted too. 

However, you can open the JavaScript set of tools and check All JavaScripts. 

 

Translate
David Creamer: Community Expert (ACI and ACE 1995-2023)
PDF Automation Station
Community Expert
Community Expert
Apr 10, 2025 11:09 AM UTC

Is this a mouse up action in the check box?  Does the field name in your script match the actual field name, exactly, including spaces and case sensitivity?

Translate
Participating Frequently
Apr 10, 2025 1:45 PM UTC

Yes & Yes 

Translate
Nesa Nurani
Community Expert
Community Expert
Apr 10, 2025 10:36 AM UTC

That should work no matter on which page it is.

Where did you place the script?

Translate