Hi all,
I am trying to create a submit button that will tell the user,thank you for submitting the form and please click send on the default mail client.I added the message but now I am not sure how to add a javascript that will open the open the email and attach the form.
Thanks!!!!
Views
Replies
Total Likes
You could use the following. You could use field entries, then you have to change the path and the objectname to yours.
var Mailto = Formular1.s1.email.rawValue;
You could use static text
var Mailto = "test@test.de";
It's your choice.
if(xfa.host.messageBox("This will be send your PDF.","Information",2,2)==4){
//fill in e-mail
var Mailto = Formular1.s1.email.rawValue;
//var Mailto = "test@test.de";
//fill in subject
var Betreff = Formular1.s1.betreff.rawValue;
//var Betreff = "Test-Betreff";
//fill in message
var Nachricht = "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=" + Betreff + "&Body=" + Nachricht + "&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"
});
}else{}
I hope that will helps?
Mandy
Views
Replies
Total Likes