These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Auto-Populate Fields from Other Field Selection

Brucenstein
Registered: Jul 6 2009
Posts: 2

Hello all, I am new to Acrobat and am finding it to be quite a bit more powerful than I expected, and as a result a bit more confusing. I have a question about how to auto-complete fields depending upon the selection of a third field.

The form I'm working on needs to display address information for one of a handful of locations, depending on who is completing the form (e.g., "Facility 1", "Facility 2", etc.). I would like to set something up so that, instead of having to type out the address in whole, the user can simply pick from a drop down list which facility they're at, and the address fields auto-complete to show the address of that facility. However, I do want those fields to still be editable in case there is a new facility, or in case someone has to otherwise amend the address.

For example, say I have three facilities with the following addresses:

Facility 1
123 Fac1 Drive
City, ST 00000

Facility 2
456 Fac2 Drive
City, ST 00000

Facility 3
789 Fac3 Drive
City, ST 00000

Instead of making the user enter all that information, I simply want a drop down box that has the options of "Facility 1", "Facility 2", and "Facility 3" (but also allow hand-entered information). Then, depending upon the facility chosen, the "Address" fields I've made will auto-populate with the corresponding street, city, etc.

Any help you can offer would be much appreciated.

Thanks,

Bruce

My Product Information:
Acrobat Pro 9.1.1, Windows
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
There for you can use a switch-case scriot in the change event of your dropt down list.

switch (xfa.event.newText) {case "Facility 1":Form1.Page1.Facility.rawValue = "Facility 1",Form1.Page1.Street.rawValue = "123 Fac1 Drive",Form1.Page1.City.rawValue = "Springfield",Form1.Page1.Zip Code.rawValue = "ST 00000";break;case "Facility 2":Form1.Page1.Facility.rawValue = "Facility 2",Form1.Page1.Street.rawValue = "456 Fac1 Drive",Form1.Page1.City.rawValue = "Gotham City",Form1.Page1.Zip Code.rawValue = "ST 55555";break;case "Facility 3":Form1.Page1.Facility.rawValue = "Facility 3",Form1.Page1.Street.rawValue = "789 Fac1 Drive",Form1.Page1.City.rawValue = "Sin City",Form1.Page1.Zip Code.rawValue = "ST 99999";break;}

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs