Expand my Community achievements bar.

Use MailDoc on a button to e-mail form but how do I get the form signed?

Avatar

Level 1

Hello!  I'm a brand newbie at this and I'm hoping someone can help me out here.

I've got a form that I would like to e-mail as a pdf attachment after the form is filled out.  The form ALSO needs to be digitally signed.  I've got a field on the form which includes an e-mail address. I would like the value of this field to be in the cc: field of the e-mail.

After some research, I've found that this is do-able using Javascript and a regular button on the form to submit it just the way I wish.

However, I'm stuck trying to get the form digitally signed.

Here's what I've tried so far:

I originally used the e-mail submit button.  That works beautifully because it allows me to enter the mailto: and subject: and has the "sign submission" checkbox.  But, there's no way to put in the cc: address

So, I then tried a regular Submit button.  Again, I could enter the mailto: and has the "sign submission" checkbox.  Still no way to put in the cc: address.

Next, I tried a regular button and used javascript event.target.mailDoc with a var cc address referencing the field on my form.  That also works beautifully in controlling the mailto: subject: cc:  BUT, I need the form to be signed before it's e-mailed.  How can I incorporate the "sign submission" checkbox into this?  The "sign submission" is a nice little dialog box that prompts the user to add their digital signature.

7 Replies

Avatar

Level 10

Check the attached sample for sending the CC email address..

https://acrobat.com/#d=pFyQRZ*C1TYAlU*8VOpV8A

1) Place a normal button on the form and change the Control Type to Submit and place your Email submit code in the click event. (Follow the above sample)

2) Change the presence of Email Button to hidden/ invisible..

3) You need to write code in the postSign event of the Signature field to execute click event of the Email Submit button.

     EmailSubmit.execEvent("click");

Hope this helps.

Thanks

Srini

Avatar

Level 1

Thanks so much for your assistance Srini, but what if I don't have an actual Signature field on the form and was trying to use the Sign Submission option, which can be found on the Submit tab of a Submit button.

Avatar

Level 10

In that case, you need to move your code to preSubmit event (which I am doing in the attached sample earlier)..

You only need one button to do both Signing the document and then send an email..

//Declare variables to hold the values

var strToAddress, strCCAddress, strSubject, strMessage

//Assign the values from form fields to the variables
strToAddress = txtToAddress.rawValue;
strCCAddress = txtCCAddress.rawValue;
strSubject = txtSubject.rawValue;
strMessage = txtMessage.rawValue;

event.target.submitForm({cURL:"mailto:"+ strToAddress + "?cc=" + strCCAddress + "&subject=" + strSubject + "&body=" + strMessage,cSubmitAs:"PDF"});

Submit by Email.jpg

Thanks

Srini

Avatar

Level 1

Thanks again for the detailed instructions Srini!

And I really hate to be a pest . . . but . . .

Using your example and not modifying it, I get the e-mail form filled out correctly and the pdf attached, however, I'm not prompted to sign it.

Any more clues?

Avatar

Level 10

You download my sample to your desktop. Open the file in Designer..

Select the button and in properties check the checkbox Sign Submission and test it.

Thanks

Srini

Avatar

Level 1

Yes.  That's what I did.  It addresses the e-mail correctly, attaches the pdf, but no prompt to sign the form.  It's obviously something stupid I'm doing.  Right?

Avatar

Level 10

I tested successfully by placing the "mailto:yourName@yourCompany.com" syntax directly in the Submit to URL property of the button. This way it was opening the Signature screen before sending the email.

Signature and Email.jpg

But when I place the send email code in the event, then the signature screen is not displayed.

Thanks

Srini