Expand my Community achievements bar.

SOLVED

How to Configure the Email Button to email forms

Avatar

Level 4

I added an email utton to my form. Everytime I click it it opens up my email client & attaches the form like it should. The only problem is, how to I make it attach the form as a .pdf? At this time it is attaching it as an .xml

Thanks

1 Accepted Solution

Avatar

Correct answer by
Level 10

That is because you might have placed an emai submit button on the form. You can change the Type to Button and set the Control Type to Submit.

Submit by Email.jpg

Thanks

Srini

View solution in original post

8 Replies

Avatar

Level 10

Change the Submit as Type property to PDF for the button.

Submit as PDF.jpg

Thanks

Srini

Avatar

Level 4

I don't have a submit tab under the object tab. All i have is the field tab...any suggestions?

Avatar

Correct answer by
Level 10

That is because you might have placed an emai submit button on the form. You can change the Type to Button and set the Control Type to Submit.

Submit by Email.jpg

Thanks

Srini

Avatar

Former Community Member

Hello Srini,  Do you know how to have the form automatically CC the submitter?

Avatar

Level 10

Place the below code in Click event of a button (Lets call it as Email Submit button) with the Control Type as Submit..

var strToAddress, strCCAddress, strSubject, strMessage
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",cCharset:"utf-8"});

Sample is here..

https://acrobat.com/#d=CK4QgXn38l49bzQlhWtKSA

Hope this helps..

Thanks

Srini

Avatar

Former Community Member

Hello Srini,

I greatly appreciate the timely feedback and support. Can I use the code you provided and default the TO Address to a specific address that I want?

Thank you,

Djuro "George" Rakas

MC: H409

Tele: (248) 350 - 4424

Avatar

Level 10

Yes. You can default the values as you like..

//These are local variables I defined.

var strToAddress, strCCAddress, strSubject, strMessage

//Here I am assigning values to the local variables.


strToAddress = txtToAddress.rawValue;
strCCAddress = txtCCAddress.rawValue;
strSubject = txtSubject.rawValue;
strMessage = txtMessage.rawValue;

//If you want to have default values for TO address try like this..

strToAddress = YourEmailAddress@YourCompany.com;

//If you have CC Address you can use other wise assign blank

strCCAddress = "";

//Do the same thing for Subject and MessageBody below..
strSubject = txtSubject.rawValue;
strMessage = txtMessage.rawValue;

Hope this helps..

Thanks

Srini

Avatar

Former Community Member

Hi Srini,

I followed your directed but now I receive a "Submit Cancelled" message.

form1.Page1.Button1::preSubmit:form - (JavaScript, client)

var strToAddress, strCCAddress, strSubject, strMessage

strToAddress = mailTo: maadjustments@bcbsm.com;

strCCAddress = txtCCAddress.rawValue;

strSubject = txtSubject.rawValue;

strMessage = txtMessage.rawValue;

event.target.submitForm();

//this.resolveNode("#event").submit.target = "mailto:"+ strToAddress + "?cc=" + strCCAddress + "&subject=" + strSubject + "&body=" + strMessage;

Djuro "George" Rakas

MC: H409

Tele: (248) 350 - 4424