Hi everyone,
I'm trying to populate an email body with form data. I've found the relevant entries in the acrobat API, but I still can't seem to integrate their examples together into my form.
As a test I put this in a button mouseup action:
var cMyMsg = "Below are the current budget figures:\n\n";
cMyMsg += "Date Compiled: " + this.getField("date").value + "\n";
cMyMsg += "Current Estimate: " + this.getField("budget").value + "\n";
app.mailMsg({
bUI: true, cTo: "myBoss [at] example [dot] com", cSubject: "The latest budget figures", cMsg: cMyMsg } );
All that came direct from the API. But nothing happens when I click the button. I then tried to swap the order, putting the var cMyMsg second after the app.mailmsg entry. This fires up the email, but doesn't include the custom message body fields. I'm thinking I don't have this nested properly, but I don't know much about javascript.
Any ideas? End result I'm looking for is a button that loads up an email to a preset address and a body populated from the form data.
Thanks!
Are there any error messages in the console when you run this code?
- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com