Expand my Community achievements bar.

Submit by Email function

Avatar

Former Community Member
I have created a form using the Submit by email button. When testing the function I get this text as the default body of the email. Where can I change this as I want the people filling out this form to see custom information.



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 for more details.
158 Replies

Avatar

Former Community Member

Hi James

Did anyone reply to your question about the email button? I have the same problem - I want the user to hit the 'Email' button and for the form to just be sent to the specified email address, without opening the user's email software.

Thanks

Avatar

Former Community Member
'Submit by Email' Button:



I am having a similar issue to one that has already been posted.



When an email message gets created, the following message appears alongside the email address,

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 for more details.



Do I need to be concerned about this? Will the email still work? Our customers will be using this form to register for an event, so I don't want to send it out if it does not function properly.



FYI...I am using Designer 7.0.

Avatar

Level 1

I have this same problem. I am using Acrobat 9 now and created a form. along withmy email id in the to address, I get some unwanted text. It is actually the text that has to appear as the body text. It seems someone has encountered this problem 2 years back and I'm just new to this interactive pdf concept.

I cant send this form out as it is wrong. The tricky part is, I tried in 4 computers and in two computers it worked correctly and it gave this problem in two other computers. All the systems had Adobe reader 8 installed and use Lotus notes as email client. Please help me on this

Avatar

Former Community Member
Hi,



thanks to all of you for the solution with the button configured as an "mailto" button. I am using Lotus Notes, everything seems to work fine but the e-mail address is entered two times? (looks like: name@domain.comname@domain.com)



Any idea how to solve this?

Avatar

Former Community Member
Hi,

I have been working the steps written by James, and I have one problem, I am working with Acrobat 7.0. Is there any way to do this with 7.0?

Avatar

Former Community Member
Brittany,



As far as I know there isn't a way to do this in 7.0. Professional 8.0 is required for the "Enable Usage Rights" feature.

Avatar

Former Community Member
Okay, here's a new twist to this issue... I hope someone can help me out.



In Designer 8.0, I want a button that will e-mail the filled-in PDF form. BUT when the user clicks the button, they need to get a pop-up that lets them choose between their local e-mail client or by Web-based mail (e.g., Hotmail).



I need step-by-steps for this.



TIA,

Glenn Cauley

Avatar

Former Community Member
OK, I have followed the instrcutions given here, and was still having no success. I re-opened the document in Acrobat 8 Professional to double-check the rights settings, and the debugger popped up with this message - has anyone else seen this?



RaiseError: Acrobat is unable to connect to your email program.

Doc.submitForm:1:XFA:form1[0]:page_3[0]:Email_Submit_Button[0]:initialize

===> Acrobat is unable to connect to your email program.

Avatar

Former Community Member
Hello everyone,



By following James's instruction using Chris's script, my form work perfectly, thank you. I now have the need to capture the text string (whatever users type in TextField4) and place it in the body of the Email. Replace "Please find attached the completed form." with value/text in TextField4.



How can I do this?



Thanks in advance.

Avatar

Former Community Member
I got it; here is how , hope it can benefit someone:



var Comment = TextField4.rawValue;

if (TextField4.rawValue == null){ Comment = " "} else {Comment = TextField4.rawValue};



event.target.submitForm({cURL:"mailto:someone@msn.com?subject=My Subject &body="+Comment+"",cSubmitAs:"PDF",cCharset:"utf-8"});



Thank you,



Khanh

Avatar

Former Community Member
Thanks for the info, Khanh



Sorry to be dense, but would someone be able to give step-by-step instructions on how to insert this code for the button in question?



I know how to bring up the script editor window, but as for getting the code set up I need to know the following:



* Show field = set to what?

* Language field = set to what?

* Run At field = set to what?



Then do I just copy/paste the information you provided, and change the name of the field as appropriate?



In the "Object" dialog box for the button, I have it set to "Submit" control type... in the "Submit" tab page, what do I put into the field "Submit to URL" ???



TIA,

Glenn Cauley

Ottawa, Canada

Avatar

Former Community Member
Using Adobe Pro 8 / Livecycle designer: Is there a way to have a submit button on a form that will email directly from the web server, rather than having the local email client pop up?

Avatar

Former Community Member
Glenn,



Here are the answers to use Khanhs code:



Show field = click (this tells the form to run the code when the button is clicked



Language field = javascript

Run At field = client



paste the code that he provided:



var Comment = TextField4.rawValue;

if (TextField4.rawValue == null){ Comment = " "} else {Comment = TextField4.rawValue};



event.target.submitForm({cURL:"mailto:someone@msn.com?subject=My Subject &body="+Comment+"",cSubmitAs:"PDF",cCharset:"utf-8"});



Change the TextField4.rawValue to your field (i.e. YourFieldName.rawValue;)



change the mailto:someone@msn.com to an email address you want it mailed to.



You can change the variable name (Comment) to something more meaningful but be sure to change it in each part of the code that it exists.



In the Object window, just leave it as regular, the code will change it to a submit button so you don't have to do it there.



I think this should work for you.

Avatar

Former Community Member
Thanks for your help, James.



I ran into some problems with this...



* "click" was not available in the list... only mouse up, mouse down (so I chose mouse up)



* I keep getting a pop-up that says "submit cancelled"

Avatar

Former Community Member
Forget my last... I had forgotten to set the button control type to "regular"



All is good... thank you to everyone for their help!



This is a pretty powerful & versatile script... can fill in a lot of information by naming the comment something different.

Avatar

Former Community Member
Thank you James and Glenn for your help.

I tried to do what you both said.

I renamed the TextField4 to SubmitbyEmail then changed the email address. When I try to save it, it says failed and gives me a warning.. What am I doing wrong?

Please help.

Avatar

Former Community Member
Jackie,



can you copy/paste your code after the changes? that will help find the problem.



and khanh, thanks for the code, this was good work and very useful code.

Avatar

Former Community Member
Hi,

I'm new to Acrobat Professional. I'm using Acrobat 8 Professional Trial version and able to configure it to submit a PDF form via email. However, when I opened the submitted form with Adobe Reader 7. The filled-in data were gone. Only the radio button selection was reserved. How do I fix this?

Avatar

Former Community Member
I just learned a lot in this thread. Still does not solve my problem. I need to submit via email but need the filename.xml to be unique or a concat of two field names.



Regards,

Dave

Avatar

Former Community Member
Nicole...I've had a similar problem with users who submit the form via 7.0, the form seems to not retain the data. I just have them update to Reader 8.0.



David....I'm unsure how to change the file name when emailing the form. I think the route to take is to figure out how to programmatically save the file with the preferred file name first and then email the form.