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.
87 Replies
pguerett
Level 10
Level 10
I just created a sample ...if you publish your email address I will send it to you.
bobtaylor24
Level 1
Level 1

Paul Could I get a copy of that too .

email: macadamia-101694@hotmail.com

Thanks

pguerett
Level 10
Level 10

It has already been attached earlier in this thread ...Feb 11 to be exact.

Paul

Anonymous
Not applicable

Hi Paul, would you send me the same sample script that you sent to Cathy? Here's my email.

Thank you,
Meg

zeromullen
Level 1
Level 1

I will have to send it to you on Monday.

Sent from Yahoo Mail on Android

zeromullen
Level 1
Level 1

I have attached a copy of my form with all names and addresses removed so that you can see the scripting on the back end. You have to have Adobe LiveCycle Designer. It comes with Adobe Pro. Follow the steps below and you will see all of the back end scripting for all of the buttons and drop downs. There are many buttons with custom scripts. The dates next to the signatures also auto-populate with the current date once the digital signature is placed. The clear form button will bring up a prompt for you to confirm versus just deleting everything on the form by accident. I have many more scripts that I have written if you need anything else.

Instructions:

1.       Open the form in Adobe LiveCycle.

2.       On the menu bar under window make sure that

script editor is checked.

3.       The script editor should be on the top tool bar

and says “Show”

4.       Click on the drop down for requestor

5.       On the right side under object and field you can

copy and paste a list of names from Excel into the list box.

6.       Under the binding tab in the value input the

corresponding email for each person.

7.       For the Admin officer, Approving official, Card

Holder, GL for Chemicals and receiver repeat steps 4-6

8.       Click on the Send to Admin Officer button

9.       There should be a blue box next to “show” on the

script editor. Using that blue box drag the script editor to the middle of the

document.

10.   You should see the scripting for this button. I

should look like this.

 

        //

First check if there are null values, then construct email using script

        varvEmail =  "";

        varvSubject = "Purchase Order Request";

        varvBody = "Attached to this email is a Purchase Order

Request.";

        varvName = "";

        varvCC = "";

        varvFormat = "PDF";

 

        if(form1.Form.PLGLDC.rawValue == null)

        {

        

   errorMessage = errorMessage + "\n - Please select who you want to send this

form to.";

        }

       

else

        {

       

     vEmail = form1.Form.PLGLDC.rawValue;

        }

   

        if(form1.Form.ChemicalYes.rawValue == 0)

        {

       

    // Everything is OK, send email

        }

       

else

        {

       

    vCC = "@nist.gov";form1.Form.GLChem.value == form1.Form.PLGLDC.value

        }

 

        //

If fields required for script are null, warn user and do not initiate email

        if(form1.Form.PLGLDC.rawValue == null)

        {

       

     xfa.host.messageBox(errorMessage, "Sending an email", 0, 0); //

Send out a custom error message if any of these fields are null

        }

       

else

       {

       

     // Everything is OK, send

email

       

     event.target.submitForm({cURL:"mailto:

"+ vEmail +"?subject=" + vSubject +"&body=" + vBody + "&cc=" + vCC,cSubmitAs:vFormat,cCharset:"utf-8"});

}

11.   Inside the parenthesis where I have highlighted

input the email address for your cispro manager.

12.   Then click the save button.

13.   Open the form in adobe pro

14.   Under file hover over save as

15.   Hover over reader extended PDF

16.   Click Enable Additional Features.

17.   Save your form in your preferred destination.

18.   All done.

 

Regards:

Elijah Gunn

303-217-1866

gunn.elijah@yahoo.com

Cyberjunky
Level 1
Level 1

Hi Elijah

I have an Adobe document created with a drop down for multiple email addresses however I cant seem to get this formula to work properly.

Below is the syntax from the Script Editor:

My Syntax pasted below:

form1.#subform[0].Button3::

click - (JavaScript, client)
if (DropDownList71.rawValue != null)
       {
    RealEmail.event__click.submit.target = "mailto:" + DropDownList71.rawValue + "?subject=" + Subject.rawValue;
    //app.alert(RealEmail.event__click.submit.target);
    RealEmail.execEvent("click");
        }

else

       {
    app.alert("Please select a user from the dropdown!");
       }

I also need some guidance to add a line that if any of the required fields are not completed then the email option should return an error.

I would appreciate any assistance you can provide.

I would appreciate any help with this, thank you.

_Bruce_Robertson
Level 10
Level 10

Paul did end up adding the sample to this thread, see his response from 12/08/2010, http://forums.adobe.com/message/3047322#3047322

Not applicable
Paul,



Email address is: trudeauc@nwdc.navy.mil



Thanks for the help.
Not applicable
Paul, would you mind sending it my way as well. Thanks.



bombdon@gmail.com



Glenn
_Nelda_Pena_
Level 1
Level 1
Paul, would you send to me as well. Thanks, Nelda



neldap@cctexas.com