Copy link to clipboard
Copied
Hey all, I'm back again with yet another question. I've searched the forums and googled lots and have found answers for livecycle but the code wont work in Acrobat. (this article and the attached PDF is almost exactly what I want: http://assuredynamics.com/index.php/portfolio/populating-dropdowns/ )
So I have "Vehicle Type" radio buttons (car, midsize, full size) that when selected show 3 checkboxes: car int, car ext, car full or mid int, mid ext, mid full, etc.
When "Vehicle Type - car" and then "car int" is selected I want "addon - drop" (I want this drop down hidden until the path is completed) drop down to have the options:
Package A
Package B
Package C
and then have the "addon total" box calculate cost (with what ever there value is)
And when "Vehicle Type - car" and then "car ext" is selected I want "addon on" drop down list to change to have these options:
Package D
Package E
Package F
and then have the "addon total" box calculate cost (with what ever there value is)
I know I can do this by making multiple drop downs with export values and then hiding and showing but I really want to cut down on the amount of fields in the document and make this as easy as possible. I know I need a javascript code and I've tried everything I can think of (I'm a beginner) so I you could *please* provide the code and where exactly to input it that would be amazing! I provided a screen shot of the structure to make more sense
Thanks!
Copy link to clipboard
Copied
First, see my answer here:
The selection process you've outlined here is more complex. You've added more selectors, so the data needs to be structured to reflect the complexity of the selections.
However, you have not fully explained the relationships. With radio buttons, only one can be selected, so it's easy to select a single list of items for the "AddOns" dropdown, but with checkboxes, any and all of them could be selected. So what happens when both the "Int" and "Ext" checkboxes are selected?
To select a price, you need a set of price data, similar to the list items, that can be selected or calculated based on the selectors. As described here:
https://acrobatusers.com/tutorials/change_another_field/
You can read more about scripting lists here:
https://www.pdfscripting.com/public/List-Field-Usage-and-Handling.cfm