Pre-Populate Dropdown based on information selected in another dropdown

terriranae

08-04-2015

Hello,

I hope this make since. I am working on building a form using Adobe Livecycle Designer. I have a dropdown list in multiple fields on the same form that will have the same information selected. I want the additional fields to automatically populate the information a user selects in the first dropdown list. Is this possible ??? If so, what would be the script/code necessary to do so ??? Thank you for your help.

Example

City, State appears in 4 different fields based on the selection in field 1, the additional 3 fields auto-populates the same information.

Field/List 1: New York, NY <-- Selected City, State

Field/List 2: New York, NY <-- Auto Populated based on field 1

Field/List 3: New York, NY <-- Auto Populated based on field 1

Field/List 4: New York, NY <-- Auto Populated based on field 1

Accepted Solutions (0)

Answers (4)

Answers (4)

Brian3_14

11-04-2015

In the exit event of the first State field, using Javascript, something like this should work:

State2.rawValue = this.rawValue;

State3.rawValue = this.rawValue;

State4.rawValue = this.rawValue;

...where "State2", "State3", etc. are references to the other dropdowns you want to populate with the same information from the first state field.

Be sure to set the binding values in the BINDING tab of the dropdowns to the same in each dropdown,

Brian

terriranae

08-04-2015

Mouslander,

All fields are dropdown list, that contain the exact same list of City, States. To avoid the user having to fill in the same information 4 times, I want them to select the desired City, state in one dropdown list and it automatically select the same City, State option in the remaining three fields. I hope this clarifies more.

mouslander

08-04-2015

I need a bit more info. For example if I pick New York then the second field is New York City and the 3rd field is a Zipcode? Is field 1 a drop down list and the rest of the fields text fields?