Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
That should work no matter on which page it is.
Where did you place the script?
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
Yes & Yes
Copy link to clipboard
Copied
I used the same templated script for multiple fields and the trend i am finding is that it is not working for any field that is not on the page of the checkbox with the script
Copy link to clipboard
Copied
Can you share your file with us?
Copy link to clipboard
Copied
Unfortunately I cannot as the file itself is propreitary
Copy link to clipboard
Copied
You can make a blank 2-page PDF and copy all those fields to the new PDF - or use "Replace page" to replace all the page contenten with blanks.
Copy link to clipboard
Copied
Well now I have a NEW problem - i decided to delete ALL JavaScript from the pdf for now... however some of my fields are hiding even when the script is gone, HELP please
Copy link to clipboard
Copied
You should be able to see all fields when in edit mode (Prepare Form) in Acrobat Pro.
Copy link to clipboard
Copied
So, create a sample file without the proprietary info.
Copy link to clipboard
Copied
The code is working perfectly for me.
Triple-check your field name and make sure you have the end brace in your code.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Thats where I put them and thats where I removed them .. they are still activated outside of preparing the form
Copy link to clipboard
Copied
Thats where I put them and thats where I removed them .. they are still activated outside of preparing the form
By @MegDough926
Sorry--you have to be doing something wrong. Sanitize the file and upload your coded version.