Hi there friends!
I've worked out procedurally how this should work, but the code is eluding me.
Inititally I had a text field that (thanks to a document level script) pulled in data from a series of checkboxes. If you checked off a box, a product name gets added to the text field. Works great!
Now I need to expand the functionality: I am adding a combo box to every product, which gives the user a chance to add HOW MANY products they would like to add to the text field.
So originally: check off box, and "widget" gets added to text field.
New Goal: Check off box, select a number on combo box and "widget x 3" gets added to text field.
First I'll change the doc script so that the text field pulls data from the combo field, not the check box. Second, I set up the combo box to have "widget x 1, widget x 2, widget x 3, etc... as a list of options.
This is where I need help: I now need the combo box to only export its value if it's controlling checkbox is active. So that way, it will only submit to my document text field if the checkbox gets clicked.
I'm pretty sure this comes down to "Export value if "checkbox prime" is true" followed by "Else, do not export value". I'd also like to hide the combo box until the checkbox is marked off, but I can't seem to find a visibility option.
I have been through the API, but I'm having trouble finding the proper code and syntax. Can someone please help?
As always, thank you so much!
The visibility of a field can be set using the display property.
- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com