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

Display dropdown value

claytonc
Registered: Feb 9 2010
Posts: 6

I would like a dropdown list that includes full definitions for the user to look at but when they select the item that they want only the abbreviation shows on the form. For example in my List Items it says "Illinois" but when they select "Illinois" it populates the field with the binding value of "IL". I've already tried:
"this.rawValue = this.xfa.event.newText;"
and
"drp_Restriction.rawValue = this.boundItem(xfa.event.newText);"
but still can't get the value of the dropdown to populate the field. I can use the value to poplulate a text field though. What am I doing wrong?

My Product Information:
LiveCycle Designer, Windows
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4307
Have you tried and looked at the "Custom" fields in the"Library". In that section, there is a custom drop down box for the "U.S. States"?

This custom field provides a drop down box with the spelled out states for display and specifies for each state the abbreviated value.

George Kaiser

claytonc
Registered: Feb 9 2010
Posts: 6
gkaiseril,

Thanks for the reply. I was just using the states as an example. My actual project includes a list of university majors and the codes associated with them. For example: Applied Arts, AART; Agribusiness Economics, ABE; Aviation Management, AVM; etc.
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4307
You can also use the 'calculate' of the text field to get the value from the drop down box.

You can use the JavaScirpt switch statement to change the 'newText' to the abbreviation you want if you want to use the 'change' event.
switch (xfa.event.newText) {case "Alabama":TextField1.rawValue = "AL";break;case "Alaska":TextField1.rawValue = "AK";break;case "Arkansass":TextField1.rawValue = "AS";break;default:break;}

George Kaiser

claytonc
Registered: Feb 9 2010
Posts: 6
gkaiseril,

Thanks again for replying. I don't want to populate the text field though. I want the user to click on the dropdown list and see "Applied Arts" and "Agribusiness Economics" then when they select "Applied Arts" it inserts the code (which I've assigned the value for under the Binding tab.) for "Applied Arts", AART into the dropdown field.
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4307
You could change the entry for the item, but that would cause loss of the original text.

Have you ever seen a drop down box work this way?

It might be possible with coding to hide and unhide fields along with setting and resetting the focused field. But you will really confuse anyone trying to update the form.

George Kaiser

claytonc
Registered: Feb 9 2010
Posts: 6
gkaiseril,

No I haven't seen this before. I just thought that it should be possible since you can assign the value to another field, such as a text field. I hate to admit defeat but I guess have to redesign the form. Thank you for your help and patience.

Clay
barzate
Registered: Mar 14 2011
Posts: 1
i have the same problem, i want to display the value of the drop-down list, i´m using formcalc. Would you like to help me.

mismo pass de siempre

jc_peru
Registered: Apr 13 2011
Posts: 2
Finally I populated a Dropdownlist. Now how can I show my data (this is comming from DBACCESS)after I choose it from Dropdownlist? I am new in this Live Cycle..

I would like to ask you for help with dropdown list. I use LiveCycle Designer 8.2 and datadase Ms Access.

DataConnection from dropdown list to the database is Ok,
Now, I do not know how to show the rest of my data after I click enter in the populated Dropdownlist

Would it be possible to help me with this? or where can I find samples of something similar?

Thank yo for you help and attention. I look forvard to your reply.