Reputation: 1
I have some javascript in an acrobat form PDF that works fairly well on a PC, but doesn't work on an ios device. My goal is to send an email to an address that is put in a field. I had a simpler version that used a mailto url to compose an email to set addresses (not pulled from a field) with subject and body. This version worked on ios.
Here is the code that I adapted from something I found online (I don't know javascript):
// This is the form return email. It's hardcoded
// so that the form is always returned to the same address.
// Change address on your form to match the code below
var cToAddr = this.getField("EMAIL").value;
// First, get the client CC email address - this should be a generic Roadmaster account for all sales people.
var cCCAddr = "";
// Next is the Roadmaster Rep's email only if it is filled out
var cBenAddr = this.getField("RMEMAIL").value;
if(cBenAddr != "")
cCCAddr += ";" + cBenAddr;
// Set the subject and body text for the email message
var cSubLine = "Order Form - Roadmaster"
var cBody = "Thank you for interest in Roadmaster products.\n" + "Your order form is attached."
// Send the entire PDF as a file attachment on an email
this.mailDoc({bUI: true, cTo: cToAddr, cCc: cCCAddr, cSubject: cSubLine, cMsg: cBody});
[1]: https://drive.google.com/file/d/1U9SGShzCYq_lDQtG0wCuetR0i4UdErsC/view?usp=sharing
Upvotes: 0
Views: 242
Reputation: 4917
No. At least, not on mobile. Not all javascript supported on the desktop is supported in the mobile versions. Specifically, this.mailDoc() is not available.
Upvotes: 1