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

Acrobat 9 - Add Email Value to Names in Drop Down Box

Brianguy
Registered: Nov 10 2008
Posts: 14

Hi All,

Hopefully a guru can help with this one.

I'm experimenting with Acrobat 9 and have a form that contains a drop-down box (combo box) with several different names in it. I want the user to be able to click on a name, then click a "Submit" button next to it that will email the form to the person they selected.

For instance, the dropdown would contain names as follows:

Joe Blow
Joe Plumber
Sara Bellum
Etc
Etc

I want to assign their email address (@somewhere.org) to each name.

A "Submit" button would be next to this dropdown that would actually email the form.

Hope someone can handhold a Acrobat 9 noobie on this one - Thanks!

My Product Information:
Acrobat Pro Extended 9.0, Windows
George_Johnson
Online
Expert
Registered: Jul 6 2008
Posts: 1875
I would use the doc.mailDoc JavaScript method for this. I believe there is some sample code in the Acrobat JavaScript reference. In general, you just need to get the value of the combo box (with the help of the doc.getField method) and set the various parameters of the mailDoc method. There's probably some code floating around here, which you can find with a search.

When setting up the combo box, set the export value of each item to the corresponding email address for the item. The value of the combo box field will then be the email address of the selected item.

George
Brianguy
Registered: Nov 10 2008
Posts: 14
Wow! I feel like the Freshman English student who just walked into the Advanced Literature class;

I'm not even getting anywhere when doing a search on the "getField" method. I'm a complete newbie to building these types of forms in Acrobat so hopefully someone will have a link to a tutorial or a step-by-step description of how to assign values to these combo box selections.

I can get the "Combo Box Properties" to come up but don't see anyway to assign values to my (multiple) drop-down names.

Anyone have a (step-by-step) method for assigning email addresses to my combo box names?

Thanks!
Brian
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4307
It sounds like you may have used LiveCycle Designer to design the form and not Acrobat Forms Tool. There are significant differences in how these products work at the UI and programing level for form design.

Both products allow for providing optional text for the value of the selected item. In Acrobat forms it is on the options tab and you can enter the value and export values.In LiveCycle Designer you need to add the selection items using the "Field: tab and then go to the "Binding" tab to specify the optional text for each item.

And with either product, you will need to use some custom scripting to perform the submit action.

George Kaiser

George_Johnson
Online
Expert
Registered: Jul 6 2008
Posts: 1875
Sorry about that. If you will be doing much JavaScript programming and/or work with forms, you need to get your hands on the Acrobat JavaScript reference. It will have the details on using the mailDoc and getField methods. Prior to the release of Acrobat 9, the reference was made available as a PDF, but now it's only available with the Acrobat SDK as HTML. :(

You can get it here:
http://www.adobe.com/devnet/acrobat/javascript.php

Version 8 will be sufficient for what you're doing.

When you add a combo box item, you should see a place to enter the "Export Value" for an item. That is where you should enter the email address for each item you add. Unfortunately, you cannot add export values to existing items, so you'll have to delete any existing items and add new ones, this time specifying the export values.

If you get stuck with the JavaScript part of it, post again, and I bet someone will be able to help.

George
Brianguy
Registered: Nov 10 2008
Posts: 14
Thanks a bunch for the info! I'll see if I can come up with something.

Brian