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

text fields is populated by a dynamically populated drop-down

dhuy
Registered: Nov 16 2007
Posts: 2

I have a drop down list that is populated by OLEDB data connection, how do I populate a text field based on that drop down? There is an example for LC V8.1 called "Purchase Order" but that example the drop down field is hard coded.
 
Any help is greatly apprieciated.

My Product Information:
LiveCycle Designer, Windows
sconforms
Expert
Registered: Jul 10 2007
Posts: 92
You'll need to script the drop down list's Change event. In the Change event, you can access the xfa.event.newText property which which will contain the text value of the item the user selected from the list. If that's what you want in the text field, then simply assign the text value to the text field:

myField.rawValue = xfa.event.newText;

If you want the value associated with the text that was selected, you can use the boundItem method:

myField.rawValue = this.boundItem(xfa.event.newText);

If your list items have text and value data, the above statement will assign the value data (associated with the selected text data) to the text field.

Stefan Cameron obtained his bachelor's degree with Honors in Computer Science at the University of Ottawa and is a Computer Scientist working on Adobe's LiveCycle server products, in particular on LiveCycle Designer ES for the past 5 years.