Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Drop Down List With Multiple Email Addresses

Not applicable
I created a form which requires users to choices from a drop down list. I want to associate their choice with a specific email address and then submit the completed .pdf form to the specified email address. I have tried writing a Java Script to accomplish this selection but have failed to make the operation work. Help!! Thanks.
4 Replies
Niall_O_Donovan
Level 10
Level 10

Hi,

If the user has the full version of Acrobat, then the email button will work. This is because the email button saves the form first and then attaches it as a PDF to the email.

Because users with Reader cannot normally save a form, the email button fails silently.

There are two ways to reader enable a form to allow users with Reader to be able to save the form (and therefore allow the email button to work):

  1. Apply rights using the server product LiveCycle Reader Extensions ES2.
  2. Apply  rights using Acrobat Standard v9 or Acrobat Professional v7 or v8.

Here is a summary of features that are available depending on whether the form is enabled and how it was enabled: http://assurehsc.ie/blog/index.php/2010/05/using-livecycle-forms-in-acrobat-and-reader/

2009-10-14 LiveCycle Forms in Acrobat and Reader.png

Another option is to set the email button to return the data as a XML file (instead of PDF). Users with Reader can achieve this without Reader Enabling the form.

Good luck,

Niall

StevePlus
Level 1
Level 1

Thank you very much for your reply, Niall.

I could Reader enable Paul's form and my form in Acrobat Pro. While Paul's form can be saved and the email button works with Reader, my form CAN only be saved in Reader but the Submit (email) button has no response.

I tried to click the Submit button in Acrobat Pro, the JavaScript Debugger returns "DropDownList1 is not defined".

Based on your chart, my form should be able to be submitted. Where might be the problem?

BTW, submitting Pdf form is preferred in our situation.

Thanks!

Niall_O_Donovan
Level 10
Level 10

Hi,

It looks like the script is referencing an object called "DropDownList1", but that this object either:

- does not exist;

- exists, but has a different name; or

- exists, but DropDownList1 is in a different subform to that of the button.

When referencing an object you need to give a sufficiently full reference.

Niall

StevePlus
Level 1
Level 1

Thanks for your immediate response, Niall.

I tried to compare what Paul did with mine. Seem I did exactly the same thing except that my form Hierarchy looks messy whereas Paul's is very clean.

Does it matter? Here is the initiation statement in JavaScript for the dropdown and it give you a clue about my hierarchy:

TopmostSubform.Page1.Paragraph[1].DropDownList1::initialize - (JavaScript, client)

Should I clean my hierarchy to make it look more like Paul's? Right now I have many Paragraphs in Page1 (DropDownList1 and the buttons are on different Paragraphs) but I only have one subform which is the TopmostSubform. Any references for cleaning the Hierarchy?

Sorry for the trouble.

Niall_O_Donovan
Level 10
Level 10

Hi,

First off, it looks like you created multiple subforms called 'Paragraph'. LC Designer keeps track of the various instances of these using a zero-based instance number Paragraph[1]. This is OK, but makes referencing objects more difficult, because LC has to resolve the node for the object.

So I would recommend that you name objects (subforms, fields, etc). So that you can easily reference them in script.

TopmostSubform is the name of the root node. This name indicates that you imported an existing Word document or PDF to start off the form. This is OK, but some of the normal LC functionality will not be available.

The DropDownList1 object is in the second instance of the Paragraph subform.  Therefore if you button is on Page1, it will need to include the subform name in its script.

For example if you left the names as they currently are (several instance of the same name), the script would look like this:

xfa.resolveNode("TopmostSubform.Page1.Paragraph[1]").DropdownList1 ...

But if you gave the subforms a unique name the script would be much easier, say 'myParagraph':

myParagraph.DropDownList1 ....

Hope that helps,

Niall

StevePlus
Level 1
Level 1

Super! It works beautifully. I used your second suggestion.

I do greatly appreciate your time and effort in helping this, Niall.

achillespablo
Level 1
Level 1

Hi Paul or anyone,

Kindly send me a copy of your sample script for the dropdown with multiple email addresses, or if anyone can send me a copy of Paul's samples, it would be greatly appreciated.

My email is archie.pablo@esa.sccgov.org.

Thanks so much.

Archie

Haagen_Dazs
Level 1
Level 1

Paul, would you mind to send me a copy as well. Thanks in advance. Haagendazs.

diy_haagen_dazs@yahoo.com.hk

Easygeezer
Level 1
Level 1

Hi, I am really struggling with this and pasting the script where I believe that it should go but it force closes my Adobe Designer, is it possible that you could look at my form for me please?

pguerett
Level 10
Level 10

Sure email the form to LiveCycle8@gmail.com and include a description of what you are trying to do ....I will look at it when I get a chance.

Paul

Niall_O_Donovan
Level 10
Level 10

Hi Meg,

Paul's example is already posted on this thread, here: http://forums.adobe.com/message/3047322#3047322.

Good luck,

Niall

Anonymous
Not applicable

Hi Niall, the form Paul posted wasn't editable; therfore I couldn't get the script. I'm new to this forum and I'm no expert. Could you direct me how to get the info I need from the pdf?

Thank you.

Niall_O_Donovan
Level 10
Level 10

Hi,

You will need to open Paul's form in LiveCycle Designer. This is a separate program to Acrobat, but it comes bundled with most versions of Acrobat for Windows. LC Designer is not available for the Mac.

Niall

Anonymous
Not applicable

Gotcha! I have access to PC. Thanks for your help Niall.

Meg

jlee9911
Level 1
Level 1

Hi Paul,

I am trying to do exactly what you have done, drop down list of 10 people and when select person's name it will finsih sending to the person's email.

Can you please send me the setup?  My email address is jl2402@columbia.edu.

Thank you very much.

Jean

lreed519
Level 1
Level 1

Could I have a copy too? This is exactly what I've been looking for.

LReed519@gmail.com

lauras017283
Level 2
Level 2

It just opens up this same thread....can someone please email me the 2009 answer or post it on this thread?

lslebodnick@hotmail.com