How to get the new selected code and description of a Drop-down using JavaScript in LiveCycle Designer

If you want to get the value of a field in LiveCycle Designer using JavaScript you can just use .rawValue, but if you are working with a Drop-down, the rawValue will contain the current value or the old one before your selection and NOT the new selection you made. To get the code and description of the new selection “in real time” use the following code (on events of the drop-down):

var theNewDescription = xfa.event.newText;
var theNewCode = this.boundItem(xfa.event.newText);

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s