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

Drop down choice needs to populate text field with unique text

poregon
Registered: Oct 27 2008
Posts: 80
Answered

I figured out how to get a text field to populate with a unique number based on the choice made in the dropdown list [if(xfa.event.newText == "Corporate") TestLocation.rawValue = 5;]. But what if I want the TestLocation field to display text, not a number? What do I use instead of rawValue?

Or am I completely wrong in my approach to this?

poregon
Salix, Iowa

My Product Information:
LiveCycle Designer, Windows
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
You have to adjust the Drop Down List to display an optional text value and not the default numeric value. You need to select the field object and then select the 'Binding' tab, check the box 'Specify Item Values:', and replace the number with the text you want displayed.

George Kaiser

poregon
Registered: Oct 27 2008
Posts: 80
Gotchya - to give a complete picture for anyone reading this later, here's what I did:

DropDown list:
Object: Field Tab - List items - Add my choices (ex. New York, LA, Boston, Chicago, Phoenix)
Object: Binding Tab set to Global; Then in the area below the Global setting, slow double click in the numerical values for each of the items that appear there and replace the numerical values with text (ex. 1 is changed to ABC Street Address, 2 is changed to 123 Street Address, etc).

Text field:
Name the same as the DropDown list

Now when the user selects City choice New York, the text box will display the appropriate address.

No JS was needed anywhere. (Reminds me of the early Queen album disclaimers - "No Synthesizers!" disclaimer on their album sleeves :)


Thanks gkaiseril!

poregon
Salix, Iowa