Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Can a drop down list show the value instead of the text?

Avatar

Former Community Member
I'm creating a drop down list where the end user only wants to see the value on the completed pdf and not the text. For example, the drop down would display:



01 This is the first option.

02 This is the second option.

03 This is the third option.



But when selected, the field would only display the value:



01



Is this possible?
4 Replies

Avatar

Former Community Member
You can have it so that when the data is submitted it will contain 01 but you cnnot change the display of the dropdown without clearing it and resetting the values to be 01, 02, 03 ...

Avatar

Former Community Member
Thanks for the response, Paul. Do you have any suggestions as to how to get something like this to work? The end user is very particular and does not want to view the whole description - just the code. However, we need the whole description for the initial user so they select the correct code.

Avatar

Former Community Member
Jill, check out my post on this subject for Designer 7.1. Perhaps you can use in 8+



http://adobeforums.com/webx/.59b5a733

Avatar

Former Community Member
Helen, thank you!!!! This one worked for me:



Also, you can achieve the same result with the Change event:



if (xfa.event.newText == "1 - Air Force") {

(xfa.event.change = "1");

}

else if (xfa.event.newText == "2 - Army") {

(xfa.event.change = "2");

}