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

form

tspinks
Registered: Feb 24 2007
Posts: 6

I am creating a form in Livecycle 8 with a drop down list of peoples names. Is there any way to pass the results to a submit or email button so the completed form is then sent to the person selected from the drop down?
 
Thank You

My Product Information:
LiveCycle Designer, Windows
lkassuba
ExpertTeam
Registered: Jun 28 2007
Posts: 3636
Hi tspinks,

I would suggest you take a look at Thom Parker's tutorial on "Programming List and Combo fields in Acrobat and LiveCycle forms at:
[url=http://www.acrobatusers.com/tutorials/2007/js_list_combo_livecycle/]http://www.acrobatusers.com/tutorials/2007/js_list_combo_livecycle/[/url]

Here is a summary of the tutorial:
"In this article, we learned how to use the Keystroke event and the event object to instantly capture the user’s selection on a Combo Box field. This was done for two different Combo Box fields. In one case, the selection was used to re-populate the list on another Combo Box. In the other case, the selection was used to set a field value."

Hope this helps,
Lori

Lori Kassuba is an AUC Expert and Community Manager for AcrobatUsers.com.

sconforms
Expert
Registered: Jul 10 2007
Posts: 92
tspinks,

Suppose your drop down list had items with text and value data and that the value data was the email address to which the form should be submitted. You could write a script that applies the email address to an email submit button on your form such that when the person clicks on the button, the form's data is emailed to the correct email address (the email address pertaining to the name they picked in the drop down list).

To do this, you could use script like this (written here in JavaScript) in the drop down list's Change event:

var sEmail = this.boundItem(xfa.event.newText);

EmailSubmitButton1.resolveNode("#event.[activity==\"click\"]").submit.target = "mailto:" + sEmail;

This would get the email address associated with the item the user picked (the text data for the item picked is in xfa.event.newText and this.boundItem gets the pertaining value data) and then set it as part of the URL associated with the email submit button (named "EmailSubmitButton1" in this example).

The path to the email submit button's "target" property is a little tricky but it's basically finding the event related to the button's Click event because that's the one that contains its submission properties.

Stefan Cameron obtained his bachelor's degree with Honors in Computer Science at the University of Ottawa and is a Computer Scientist working on Adobe's LiveCycle server products, in particular on LiveCycle Designer ES for the past 5 years.