Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Dropdown value instead of text

SalukiFan
Level 1
Level 1

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 is says "Illinois" but when they select "Illinois" it populates the field with the binding value of "IL". Is this possible?

1 Accepted Solution
Srini_Dhulipall
Correct answer by
Level 10
Level 10

See the attached sample file.. If it helps..

I am placing a TextField on the top of the Dropdown and setting the selected rawValue to the textfield..In the exit event of the Dropdown I am hiding the dropdown and displaying the textfield. Similarly, in the enter event of the text field, I am displaying the dropdown field and hiding the text field.

This way I can display "IL" if you choose "Illinois" from the dropdown.

https://acrobat.com/#d=7Y0qDg-ld6nWNxw8G-0cNg

Thanks

Srini

View solution in original post

7 Replies
Srini_Dhulipall
Level 10
Level 10

Usually the Dropdown has rawValue and formattedValue properties..

DropDownList1.rawValue will give you "IL"

but

DropDownList1.formattedValue will give you "Ilinois"

You can use the exit event to display either one based on your requirement..

Thanks

Srini

SalukiFan
Level 1
Level 1

Thanks Srini!  I'm now able to populate a text field but I still can't get it to populate the dropdown field. I'm not sure of the javascript to use to assign the value to the dropdown. To assign the value to the textfield I'm using "TextField1.rawValue = DropDownList2.rawValue"

Srini_Dhulipall
Level 10
Level 10

See if this can help you..

https://acrobat.com/#d=QvRHYq6i1xTmOc8d7kMA1A

I am selecting a State code from one dropdown field and then displaying the corresponding text in a different dropdown.

I have placed two buttons on the form, one to display rawValue and one for displaying the formattedValue..

Thanks

Srini

SalukiFan
Level 1
Level 1

Srini,

I see how that works but I only have 1 dropdown. I'm using "this.rawValue = DropDownList2.rawValue" in the EXIT event but it doesn't change the value when you exit the field.

Srini_Dhulipall
Level 10
Level 10

Can you send the form to LiveCycle9@gmail.com so I can have a look at it..

Please mention where the issue is..

Thanks

Srini

Srini_Dhulipall
Correct answer by
Level 10
Level 10

See the attached sample file.. If it helps..

I am placing a TextField on the top of the Dropdown and setting the selected rawValue to the textfield..In the exit event of the Dropdown I am hiding the dropdown and displaying the textfield. Similarly, in the enter event of the text field, I am displaying the dropdown field and hiding the text field.

This way I can display "IL" if you choose "Illinois" from the dropdown.

https://acrobat.com/#d=7Y0qDg-ld6nWNxw8G-0cNg

Thanks

Srini

View solution in original post

SalukiFan
Level 1
Level 1

Srini,

That works! Thank you very much!