简体   繁体   中英

Showing and hiding a list box on a spawned template page in Adobe Acrobat Pro

I'm struggling here and I'm hoping I'm just missing some small detail.

In a nutshell, I have a PDF file that by default has three pages shown and five hidden template pages. A drop-down form on the first page has five options and depending on the selection one of the five template pages pops up at the end of the document (as page 4).

On one of those template pages is a drop-down with two choices, "High" or "Low". If "High" is selected it shows another drop-down with a few different options and a list box with multiselect enabled. The listbox populates different choices depending on that second drop-down's selection. If "Low" is selected the drop-down and list box are hidden and four checkboxes are unhidden.

All of this works perfectly on the actual template pages, I don't have the exact code with me as of right now (as it's at my work )of the High/Low drop-down, but the code is set as a simple if/else if/else on the drop-down to display.visible/hidden based off of the selection.

The issue I'm running into is that I can not get the listbox to hide when the template pages is hidden and the 4th page is spawned. I have updated the JavaScript to Acrobat's p4.PageName.FormItem format and I've tripple checked my JavaScript and I can't see any errors. Everything else will toggle hidden/visible without an issue, but just not the listbox... If I'm on the template page and I delete and readd the exact same JavaScript it works, but as soon as I spawn a different page and then respawn that one it goes back to not working (which makes sense).

So... What in the world am I doing wrong, or how exactly do I go about fixing this?

I just wanted to provide an answer to my own question, as I was able to finally figure this out. The issue was a simple one, the person that originally made the pdf had a JavaScript code that, for some reason I still don't fully understand, made sure the list box and a few other form fields were always set to visible. Once I removed that everything worked like a charm. Should have probably looked into that first!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM