I have put a javascript code on a button to email a form. The script is as follows:
var oDoc = event.target;
oDoc.mailDoc({
bUI: false,
cTo: "pnf [at] jeffersonregional [dot] com" ,
cBcc: "renee [dot] holtzman [at] jeffersonregional [dot] com; janice [dot] lenz [at] jeffersonregional [dot] com" ,
cSubject: " " + LastName.rawValue + ", " + FirstName.rawValue + " : Reason - " + ReasonforChg.rawValue + " "
})
How can I modify the script so that when the user clicks it an email is sent without launching an email window?
Also, how can I add validation script before the email is sent to tell the user that required information is missing and how and where would I add this script?
There are several ways to do a validation script but first tell me are you wishing to check if there empty or if they have entered something dumb into the field?
While its possible to create a presubmit instead im going to walk you through doing a validation of empty fields on your click event and work your print script into it.
Edit
Sample
https://share.acrobat.com/adc/document.do?docid=534e39e6-d209-4dc9-ba38-7c5fde0e52ec
I dont know what I was thinking.