Hi everyone,
I'm trying to modify what the body of the email will look like once the user has pressed an email submit button. In Livecycle designer, I clicked on the button and viewed the xml source. I scrolled down to the following line:
<submit format="xml" textEncoding="UTF-8" target="mailto:test&test.com?subject=My subject"/>
Then changed it to:
<submit format="xml" textEncoding="UTF-8" target="mailto:test&test.com?subject=My subject?body=new body"/>
When using the mailto the parameters are preceded by a ? and all subsequent parameters are separated
by an &. Also the email address needs an @ not an &. So your command woudl be:
<submit format="xml" textEncoding="UTF-8" target="mailto:test@test.com?subject=My subject&body=new body"/>
Paul
I'm basically trying to remove the default email body that appears when the "submit by email" button is clicked, ie:
The attached file contains data that was entered into a form. It is not the form itself.
The recipient of this data file should save it locally with a unique name. Adobe Acrobat Professional 7 or later can process this data by importing it back into the blank form or creating a spreadsheet from several data files. See Help in Adobe Acrobat Professional 7 or later for more details.
I can't even find the above text in the xml code so I dont' even know how to remove it.
Any further help with these problems, would be much appreciated.
It looks like you are changing the xml source directly and have introduced an error nstead of using the script editor. If you send the form to LiveCycle8@gmail.com I will have a look
Paul
Hi,
if you need an easy way to design the mailTo button you can use my macro for Designer (9.x and 10.x).
It will add a mailTo script to a regular button.
http://thelivecycle.blogspot.com/2011/07/mailto-maker-macro.html
Hi,
Instead of using the email object from the Custom library, use a regular button and choose "Submit" as the control type. Then in the Submit tab, in the "Submit to url" field, add something like the following:
mailto:test@test.com?subject=Application Form&body=new body
Hope that helps.
What I ran across in my searching (that worked) was to create hidden fields that contained the data I wanted to use. I also used a "dummy" submit button. The "real" submit button was created as a literal submit button and the following code inserted into the click event of the "dummy" button (which is a Regular button)
RealEmail.event__click.submit.target = "mailto:person@address.com?subject=" + SUBJECT.rawValue;
//app.alert(RealEmail.event__click.submit.target);
RealEmail.execEvent("click");
This code was modified from another's answer, but does the job. The field "SUBJECT" is set as "Hidden" in the presence drop-down of the object tab. I suspect one could add '&body=' as follows
RealEmail.event__click.submit.target = "mailto:person@address.com?subject=" + SUBJECT.rawValue + "&body=" + BODY.formattedValue;
You would create the field "BODY" and insert the message text and call the formatted value to fill it in. Set the field to "Hidden" so it does not affect your form layout. I am open to being corrected by more experienced scripters (Please and thank you) if I am in error, here.
You can do the following:
You have to use a normal button!!
//fill in e-mail
var Mailto = Formular1.s1.email.rawValue;
//var Mailto = "test@test.de";
//fill in subject
var SubjectBetreff = Formular1.s1.betreff.rawValue;
//var Betreff = "Test-Betreff";
//fill in message
var MessageNachricht = "Content PDF:\r" + "Field content: " + Formular1.s1.inhalt.rawValue + "\rName: "
+ Formular1.s1.name.rawValue + "\rDatum: " + Formular1.s1.datum.formattedValue;
//var Nachricht = "This is a test message.\r2.row start here.\r3.row here.";
//fill in e-mail cc
var CC = Formular1.s1.emailcc.rawValue;
//var CC = "testcc@test.de";
//fill in e-mail bcc
var BCC = Formular1.s1.emailbcc.rawValue;
//var BCC = "testbcc@test.de";
var Mail = "mailto:" + Mailto + "?Subject=" + SubjectBetreff + "&Body=" + MessageNachricht + "&cc=" + CC + "&bcc=" + BCC;
//cSubmitAs: "PDF" send the pdf as attachment
//cSubmitAs: "XML" send the pdf as xml-attachment
event.target.submitForm({
cURL: Mail,
bEmpty: true,
cSubmitAs: "XML"
});
Hope it will helps you,
Kind regard Mandy
North America
Europe, Middle East and Africa
Asia Pacific