Add Text To Email Body In LiveCycle Designer 8

938 views
Skip to first unread message

MPC67

unread,
Jun 9, 2008, 10:27:13 PM6/9/08
to Adobe LiveCycle Developers

Hi,

I was able to make a form and it seems to work pretty good. However,
in order to simplify things for the recipient, I wanted to know if
there was a way for the form to automatically send itself via email,
thus bypassing the auto-generated email window, when the "Submit By
Email" button is pressed? Maybe some HTML/XML language to add, or a
script of some sort?

If this is not possible, them is there a way to automatically place a
message in the body of the auto-generated email that pops up?
Obviously, I can add the return/mailto: addtess and the subject, but
no box for a small message in the body of the email. This too would
nbe great. Again, maybe some HTML/XML language to add, or a script of
some sort?

Appreciate an immediate reply, so I can send this form ASAP.

Bob Bailey

unread,
Jun 10, 2008, 9:04:31 AM6/10/08
to Adobe LiveCycle Developers
You should be able to do this using Acrobat JavaScript. Try adding a
button to the form and put this in the clicked event.

var myDoc = event.target;
var mail_message = "This is the message"
var mail_subject = "Subject of Email"

myDoc.mailDoc({
bUI: false,
cTo: "who...@xyz.com",
cSubject: mail_subject,
cMsg: mail_message
});

Check the Acrobat JavaScript reference for mailDoc so you can
configure the parameters the way you need them. Also, I think after
creating the form I had to certify it in Acrobat so it would do the
"silent" submit.


Bob

MPC67

unread,
Jun 10, 2008, 12:51:09 PM6/10/08
to Adobe LiveCycle Developers

Hi Bob,

Thks for your quick reply and very helpful info. I just downloaded the
Acrobat JSS Reference guide. It reads, "Saves the current PDF document
and mails it as an attachment". I just need the XML data file mailed
to me, which is automatically attached to the self generated email
(per "Submit By Email" button in LiveCycle).

If this Java script will only em the PDF, not the XML file, then, is
there a line that I can use to amend to the existing "Submit By Email"
script to add a message to the outgoing email that is automatically
generated by LiveCycle? This is the line I am referencing; "<submit
format="xml" target="mailto:m-...@vanillabean.com?subject=HEOCO -
REACH Survey Reply" textEncoding="UTF-8"/>

Appreciate a reply,

Michael

On Jun 10, 9:04 am, Bob Bailey <bobai...@adobe.com> wrote:
> You should be able to do this using Acrobat JavaScript.  Try adding a
> button to the form and put this in the clicked event.
>
> var myDoc = event.target;
> var mail_message = "This is the message"
> var mail_subject = "Subject of Email"
>
>             myDoc.mailDoc({
>             bUI: false,
>             cTo: "whoe...@xyz.com",
>             cSubject: mail_subject,
>             cMsg: mail_message
>             });
>
> Check the Acrobat JavaScript reference for mailDoc so you can
> configure the parameters the way you need them.  Also, I think after
> creating the form I had to certify it in Acrobat so it would do the
> "silent" submit.
>
> Bob
>
> On Jun 9, 10:27 pm, MPC67 <mp...@yahoo.com> wrote:
>
>
>
> > Hi,
>
> > I was able to make a form and it seems to work pretty good. However,
> > in order to simplify things for the recipient, I wanted to know if
> > there was a way for the form to automatically send itself via email,
> > thus bypassing the auto-generated email window, when the "Submit By
> > Email" button is pressed? Maybe some HTML/XML language to add, or a
> > script of some sort?
>
> > If this is not possible, them is there a way to automatically place a
> > message in the body of the auto-generated email that pops up?
> > Obviously, I can add the return/mailto: addtess and the subject, but
> > no box for a small message in the body of the email. This too would
> > nbe great. Again, maybe some HTML/XML language to add, or a script of
> > some sort?
>
> > Appreciate an immediate reply, so I can send this form ASAP.- Hide quoted text -
>
> - Show quoted text -

Srinath Subramanyan

unread,
Jun 10, 2008, 10:35:32 PM6/10/08
to live...@googlegroups.com
HI Michael,


var myDoc = event.target;
var mail_message = "This is the message"
var mail_subject = "Subject of Email"

myDoc.submitForm({cURL:"mailto:who...@xyz.com?subject="+mail_subject+"&body="+mail_message,
    bEmpty: true,        // Post all fields (true), or do Not post all fields (false)   
    cSubmitAs:"XML",    // Post XML format
    cCharset:"utf-8"});

this wuld work...
--
srinath
9841942055

ysa...@gmail.com

unread,
Sep 21, 2020, 4:08:07 AM9/21/20
to Adobe LiveCycle Developers
Hi All,

I have a similar requirment, but the form is of HTML form. The above code is working for PDF form, but when the form is opened in browser it is failing. Can you guys sugest the changes for HTML form submit button ??

Thanks in advance,
Abhilash

Reply all
Reply to author
Forward
0 new messages