


Hi, I'm relatively new to this stuff...In LiveCylce Designer ES, I created an email button that when clicked, I want it to attach the current fill-in PDF and email to a fixed email address, cc the email address entered in a form field, pull a name from form to be included in Subject line. In the Script Editor, I chose JavaScript at the Language and put the following script under form1.#subform[0].Button1::mouseUp - (JavaScript, client)
var cToAddr = "persons mail address";
var cCCAddr = this.getField("Email").value;
var cStudentName = this.getField("StudentName").value;
var cSubLine = "Paperwork for " + cStudentName;
var cBody = "Message to submitter";
this.mailDoc(bUI: true, cTo: cToAddr, cCc: cCCAddr,
cSubject: cSubLine, cMsg: cBody);
When I test it, nothing happens (no error msg or anything) when I click the button. (Users will be using Adobe Reader.) Please help...thanks in advance.
Views
Replies
Sign in to like this content
Total Likes
Did you Reader extend the form .....Reader cannot do that unless you reader extend the form out of Acrobat first. Do you have Acrobat?
Paul
Views
Replies
Total Likes
Along with reader extending, you have syntax error in the last line of code.
Use the below.
event.target.mailDoc({bUI: true, cTo: cToAddr, cCc: cCCAddr, cSubject: cSubLine, cMsg: cBody});
Thanks
Srini
Views
Replies
Sign in to like this content
Total Likes
Hi Paul,
Thanks for getting back to me so quick. I have Acrobat 9 Pro & extended it. (I also tested it there, too.)
Marcia
Views
Replies
Sign in to like this content
Total Likes
Thanks, Srini. Plugged in that code…still nothing. I’m wondering if there’s a setting that I’m missing…i.e., in the Object Palette for the button, under Field tab > Control Type, I selected Regular (Execute & Submit are the other 2 choices).
Views
Replies
Sign in to like this content
Total Likes
Regular is what it should be ...try it on your Acrobat version first (to ensure we have the code right) ....are there any errors on the java console?
Paul
Views
Replies
Total Likes
Tried it in Acrobat…nothing. Nothing shows up in the Report Palette or when I click the Check Script Syntax. Is there anywhere else I should ck? Also, is there anything in Form Properties I should enable or disable, etc.? Thanks, again.
Views
Replies
Sign in to like this content
Total Likes
Will need to see the form in action ...can you email it to LiveCycle8@gmail.com and include a description of the issue in the email.
Thanks
Paul
Views
Replies
Total Likes
Paul,
This is just a test version; I figure I would plug variations into several different forms I’m working on once I get it figured out. I didn’t extend this version; thought it would make it easier for you.
Description:
- Email to a fixed email address
- CC to an address grabbed from form
- Include name from form in Subject line
- Body text
Thanks a bunch for your help.
Views
Replies
Sign in to like this content
Total Likes
You cannot attach anything to this forum post ...you will have to email it to me as per my previous email.
Paul
Views
Replies
Total Likes