Wednesday, December 05, 2012

How to Populate Drop Down??

0 comments

Q)How to Populate the contents in a Drop-Down according to the value entered in the
TextField and keeping the list consistent in Adobe Livecycle Designer Using JAVASCRIPT??

A) This example uses two text fields named:  Party1 and Party2.

If you have a droplist (or many droplists) and this javascript is placed in the
PREOPEN event of the droplist(s):

this.rawValue = null;

this.clearItems();

this.addItem(Party1.rawValue);
this.addItem(Party2.rawValue);
 Thats it...!!!



Part II:

If you have other items for your droplist(s) that are to appear in
addition to the "variable language" entered by a user you
can add that to the script.
For example in addition to the Party1 and Party2 name appearing
in my droplist I also want the list to have an option for a user to select:
"The parties jointly"  then I add this to the script:

this.addItem(Party1.rawValue);
this.addItem(Party2.rawValue);
this.addItem ("The parties jointly");

Hope that helps!!!

RJ



Post a Comment