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

Drop down populated with setInstances in subform

beachbumbali11
Registered: Mar 5 2008
Posts: 74

Ok not sure how to do this one any help would be greatly appreciated.
Subform that allows for adding guest names and info. so it uses the set instance connected to a button. What i am trying to do is create another subform where the Names of the guests can be added and chosen from a drop down so as they dont have to be retyped.
Have been cruising around here for two hours finding diferent pieces a little confused as to the best way to do this, additem, array, rawValue.

Basically i am trying to do this both are subforms that have a button to setInstances

subform1 add guest information (guest names are manually entered)
subform2 add guests Names(from subform1 via drop down) to tour packages

Any Ideas?

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
What you are asking for is not a simple thing. And it certainly not suitable for a quick answer on this forum. You have to understand a bit about LiveCycle architecture and JavaScript first.

Watch the upcoming seminar on LiveCycle JavaScript
http://www.acrobatusers.com/events/online/245/

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

beachbumbali11
Registered: Mar 5 2008
Posts: 74
So are you telling me that it is possible and if that is so difficult what about just populating a subform with those elements and allowing a user to zero out the fields that they dont need could this be accomplished with say a resolve node cmd?
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
The problem isn't that it's difficult. It's just that there are a lot of parts to the solution you want. There are scripts in multiple places, and it's not just a scripting issue, the form has to be setup and saved properly.

when asking a question on any forum you should ask a single question about something very specific. General questions don't get a lot of traction because, frankly, it's difficult to give a specific answer to a broad question.

Ok, given that you've setup the form hierarchy correctly for dynamic creation of the subform, you can easily create new subform instances with the "addInstance()" function. Don't use setInstance for this. This code could inlcude the code that populates the fields in the new subform. It could be placed in a button, or in the change event for the pulldown.

As for handling items in the dropdown. Here's an article that covers the topic, and also covers populating other fields from a dropdown.
http://www.acrobatusers.com/tutorials/2007/js_list_combo_livecycle/

However, this is a big topic with a lot of different parts, you'll get the best info by attending the seminar.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script