I needed a dynamic submit button that would cc a field from the form. I found the following script and it works great, but it doesn't give an error message if someone didn't fill in a required field like a regular submit button would. Is it possible to use the script below but to check for required fields?
// 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 = "909@gideons.org";
// First, get the client CC e-mail address
var cCCAddr = RegionalDirector;
// Set the subject and body text for the e-mail message
var cSubLine = "909 Camp Visitation Report-" + xfa.resolveNode("#subform[0].#subform[7].Country"); var cBody = "Thank you for submitting your 909 report.\n" + "Save a copy for your records";
// Send the form data as an FDF attachment on an e-mail
event.target.mailDoc({
bUI: true,
cTo: cToAddr,
cCc: cCCAddr,
cSubject: cSubLine,
cMsg: cBody
});
Views
Replies
Total Likes
Hi,
Maybe this post will help, http://forms.stefcameron.com/2008/08/28/submitting-form-data-by-email/
Bruce
Views
Replies
Total Likes
Hi, I have the same question as the OP and I didn't think that the article linked to answered the question at all. Your link is about how to choopse the email that the form goes to. We want the form to not submit when required fields have been missed, and give an error message.
Can anyone help?
Views
Replies
Total Likes
Hi,
I guess a few more words would have helped. Stefans approach is to use the standard email submit button (so don't use the mailDoc method), this gives you the validations but means you must update the email submit button address, which he does with his "two button submit technique".
Regards
Bruce
Views
Replies
Total Likes
But if you use the standard submit button you can't specify the subject, cc and all of that can you??
Views
Replies
Total Likes
Hi,
stefan's example uses a method that seems a bit clumsy or maybe that was the only way it could be done in 2006. Assuming your email button is called EmailSubmitButton yo can use;
EmailSubmitButton.event__click.submit.target = emailtarget;
where emailtarget is a string in this format
mailto:emailaddress?cc=emailaddress?bcc=emailaddress?subjext=text?body=text
The bold parts you can't change but you can leave out, except for the mailto and the to email address that follows it.
Regards
Bruce
Views
Replies
Total Likes
Nevermind, Just realised that this is a discussion about LifeCycle and not Acrobat My bad.
Views
Replies
Total Likes