Skip to main content
Participating Frequently
April 10, 2025
Question

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

  • April 10, 2025
  • 3 replies
  • 1058 views

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 

3 replies

try67
Community Expert
Community Expert
April 10, 2025

Works fine for me... See attached.

Participating Frequently
April 10, 2025

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?

 

Dave Creamer of IDEAS
Community Expert
Community Expert
April 10, 2025

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. 

 

David Creamer: Community Expert (ACI and ACE 1995-2023)
PDF Automation Station
Community Expert
Community Expert
April 10, 2025

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?

Participating Frequently
April 10, 2025

Yes & Yes 

Nesa Nurani
Community Expert
Community Expert
April 10, 2025

That should work no matter on which page it is.

Where did you place the script?