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

populate numerous fields from drop down list selection

johnmolina
Registered: Mar 27 2008
Posts: 76

Hope someone can point me in a good direction.

I have worked a little with drop down list to where when the "text" is selected, I take the "value" from the properties and populate a secondary field on the form.

This time I have to create a drop down list that based on that selection, has to fill 5 other fields on the form all the time.

Then, based on the selection (a type of test), various other additional fields have to be populated or left blank.

Can anyone recommend a good solution on how for me to go about doing this?

thank you very much.

My Product Information:
LiveCycle Designer, Windows
scderacjor
Registered: Mar 27 2009
Posts: 123
It's a bummer nobody has helped you yet. I have the same request and everybody keeps pointing me to the same link: http://www.acrobatusers.com/tutorials/2007/js_list_combo_livecycle

I'm not experienced enough to know how to get this example to do what I want, but it might help you.
nattyp
Registered: Jul 14 2009
Posts: 11
I agree scderacjor, as I have asked a similair question as well (2 dropdown list selections = one of 4 predetermined options) and was pointed to a document I had read prior to posting my question which was only posted as I felt I had exhausted my search ability due to my lack of IT jargon knowledge!!!
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
To populate several fields depending on a selection of a dropdown list you can use a switch-case-script.

//Put this script into the change event of the dropdown listswitch (xfa.event.newText) {case "John":Name.rawValue = "John",Surname.rawValue = "Anybody",Adress.rawValue = "3rd Street 3A",ZIP.rawValue = "8574",City.rawValue = "Sin City";break;case "Mike":Name.rawValue = "Mike",Surname.rawValue = "Someone",Adress.rawValue = "1st Ave 123",ZIP.rawValue = "5452",City.rawValue = "Springfield";break;}

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

scderacjor
Registered: Mar 27 2009
Posts: 123
radzmar's code did not work for me. The error message said there was a problem with the "switch" part.

My solution to this problem was to stick to what I know and stop wasting time trying to figure out something that was very frustrating to me. I resorted to if/else codes for check boxes. Unfortunately I did not want the check boxes to print, so I also had to incorporate if/else codes for if one of the 30 check boxes is selected, then they all disappear. This code is placed in the click function. It's working for me and it's easy to keep organized. If anyone is interested in a more detailed explanation, just let me know.
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
You have to use "JavaScript" as the language.

Note that Thom's aticle has AcroFroms (Acrobat) and LiveCycle Desiger forms, you should look at the appropriate version of the form.

George Kaiser