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

Eliminating items from dropdown box as selected

NancyM
Registered: Sep 25 2006
Posts: 40

I am creating a client setup form. I have a dropdown box that lisit all of the United States states. There are multiple lines that will use this same list of states. My question
1. Is it possible to eliminate the prior choices form the drowdown box once selected on a previous line.
2. If it is, how do I begin.

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Yes, you can modify the contents of a list with JavaScript. Use the "change" or "validate" methods to identify the selected item and remove it from the list.

A good place to start would be reading both parts of this artical. Both parts provide sample code. Neither does exactly what you want, but much of the code could be modified for your use.

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

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script