These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Combo Box question

JORO-David
Registered: Apr 14 2009
Posts: 25

Hi,

I am new to designing PDF forms and I have a question about combo boxes. I have been able to create them, populated with the selections I choose, but I want to know how to use the selection in one combo box (call it CB1) to control/limit/filter which selections are available to choose from in another combo box (call it CB2).

For example:

- CB1 has 4 choices to select from when you do the pull-down: A, B, C, D

- CB2 has 8 choices to select from initially when you do the pull-down: red, blue, yellow, green, orange, purple, black, white

- I want my file to work like this --> if you select "A" in CB1, then the only choices available to you in CB2 are "black" and "white". If I were to go back to CB1 and change my selection to "B", then I only want "red" and "blue" available to choose from in CB2.

ANY HELP WOULD BE GREATLY APPRECIATED!!!

My Product Information:
Acrobat Pro 6.0, Windows
Dimitri
Expert
Registered: Nov 1 2005
Posts: 1389
Hi JORO-David,

This article should help you out- make sure to download the example PDFs so you can examine the code used to make it work.

http://www.acrobatusers.com/tutorials/2007/js_list_combo_livecycle

Hope this helps,

Dimitri
WindJack Solutions
www.pdfscripting.com
www.windjack.com
JORO-David
Registered: Apr 14 2009
Posts: 25
Thank you for the link.

I will attempt to figure it out, but that example is far more extensive then I require. I'll have to figure out what to cut out from the code provided, in order for me to actually be able to adapt it to my file.

If you know an even more simple example (ie: without the pricing part or the multiple rows of data entry), that would be fantastic!
Dimitri
Expert
Registered: Nov 1 2005
Posts: 1389
Hi JORO-David,

That's the best one I know of, but you can spend some time looking over the forms in the Forms Gallery here at AUC. Maybe you'll find something there, but everything you need is in the example from the article I linked to. Sure, it will take you some time and effort to make the script exactly as you need it, but believe me it would take anyone, including an expert, time and effort to create a specific scripting solution. The time and effort you put in will give you a much better understanding of how your script works so you can re-create or modify it faster for future projects.

Hope this helps,

Dimitri
WindJack Solutions
www.pdfscripting.com
www.windjack.com
JORO-David
Registered: Apr 14 2009
Posts: 25
Thanks very much Dimitri, I was able to get it working!

Now I am being ambitious and wondering if I can use similar scripts to restrict data entry. I have some text box fields that I want to either allow data to be entered or prevent any data from being entered, based on selections from a combo-box pull-down. I have a few ideas to try, but any suggestions would be helpful!

Thanks again!
jjalaska
Registered: Apr 27 2009
Posts: 1
Hi.
When I enter the first combo box information, all other similar fields are populated automatically. When I enter the second combo box information, all, inculding the first one is changed or updated to the one I just entered.
What did I do wrong?
I am the author of this document so I can change it.