Copy link to clipboard
Copied
I am trying to write a javascript that will send an e-mail when a checkbox is checked that will include certain fields from the form within the body of the e-mail. Is this possible?
Copy link to clipboard
Copied
Check out this tutorial: http://acrobatusers.com/tutorials/dynamically-setting-submit-e-mail-address
Copy link to clipboard
Copied
I have tried refering to the tutorial that you mentioned but I am not familar with javascript at all. When I copied and pasted the codes...nothing happens so I'm not sure what I am doing wrong.
Copy link to clipboard
Copied
Yuki,
You need to modify the script to suit your form.
What are the field names on your form that you want to include in the email?
Copy link to clipboard
Copied
here is the code that I copied and used
// This is the form return e-mail. Its hardcoded
// so that the form is always returned to the same address
// Change address on your form
var cToAddr = "gleeherr@tuftsmedicalenter.org";
// Set the subject and body text for the e-mail message
var cSubLine = this.getField("generic name trade if applicable").value + this.getField("Strength").value + this.getField("Dosage Form").value;
// Send the form data as an PDF attachment on an e-mail
this.mailDoc({bUI: true, cTo: cToAddr, cCc: cCCAddr,
cSubject: cSubLine, cMsg: cBody});
I want the subject field to Generic name trade if applicable + strength + dosage form
Also, is there a way for the e-mail to just automatically send without having the user to actually hit the send button in outlook? When i distribute the form without the submit buttons, it automatically creates a submit button and when the end user hits the submit button, an e-mail automatically gets generated with the filled-in pdf attached and sent automatically to the owner of the form's e-mail.
Copy link to clipboard
Copied
Also, is there a way for the e-mail to just automatically send without having the user to actually hit the send button in outlook?
Only if a special script is installed on the local machine of each user of the file.
Copy link to clipboard
Copied
What would this script look like? I would love to see a sample for a system I'm working on.
Copy link to clipboard
Copied
A better approach is to submit the data to a web-server. At any rate, due to security reasons, it won't be completely automatic. The user will have to approve sending the data, at least once.
Copy link to clipboard
Copied
I'm having trouble submitting the data to a web-server. I put the url of a directory on our website to hold the results of the submit (www.lsefspartans/public_html/wp-content/uploads/).
When I press submit I get the message:
This document is trying to connect to:
file:///c|/users/mona_/documents/web%20development/grants/www.lsefspartans/public_html/wp-content/uploads/
Which doesn't exist. It's appending the directory that I downloaded the pdf to with the URL I put in the submit button.
I therefore get the message: Error opening URL to submit this form.
Any ideas? Thanks in advance!
Copy link to clipboard
Copied
monab1 wrote
I'm having trouble submitting the data to a web-server. I put the url of a directory on our website to hold the results of the submit (www.lsefspartans/public_html/wp-content/uploads/).
That's now how it works. Your server has to be set up with a program that's designed to properly respond to a submitted form. There are all sorts of technical details that I'm not going to get into, but it's not as simple as you've assumed.
Copy link to clipboard
Copied
Do you know where I can find documentation/instructions on how to write that program? Thanks
Copy link to clipboard
Copied
The following discusses the basics: Sending form data - Learn web development | MDN
Copy link to clipboard
Copied
Hello,
Can you help me write a java script? I have an Adobe sign form with an email field set as a required field that will be sent out via email. I want to ensure that a complete email address is provided when the form is completed. Can you help with this?
Copy link to clipboard
Copied
This is not possible in an Adobe Sign form.
Copy link to clipboard
Copied
Thank you.
Copy link to clipboard
Copied
Can anyone help me doing this work for mobile? As my script is working fine on PC but not submitting the form on Andriod device. What can add to my script to make it work for mobile too?
Copy link to clipboard
Copied
Mobile viewer don't support the same level of JavaScript. So you can't.
Copy link to clipboard
Copied
Any alternate way of doing this on mobile??
Copy link to clipboard
Copied
Copy link to clipboard
Copied
A script is the only way.
Copy link to clipboard
Copied
Ok, I have this work along time ago. Doing new fun projects now.
So How do I email only one of the pages of the PDF without extracting the one page?
//this.Page# ({bUI: true, cTo: cToAddr, cSubject: cSubLine, cMsg: cBody});
Copy link to clipboard
Copied
Not possible. You have to either extract the page you want to send or delete the pages you don't want to send.