I have a PDF form, it's very basic, only 4 fields. I need to add a button and have it send an email out based on data entered into the form.
Currently I have the following.
var's for the four fields.
var cName = this.getField("Name").value;
var cNumber = this.getField("Phone").value;
var cEMail = this.getField("Email").value;
var erAgent = this.getField("Agent").value;
Email structure.
var erBody = cName + "has entered their details and with to be contacted on " + cNumber + " for phone or can be EMailed at " + cEMail;
var erSub = cName + " details";
var erEmailURL = "mailto:" + erAgent + "&subject=" + erSub + "&body=" + erBody;
When I add a submit function, i can't get any of them to work. I have added a few below.
app.mailMsg({cURL: encodeURI(erEmailURL)});
app.mailMsg({cURL:"mailto:" + erAgent + "&subject=" + erSub + "&body=" + erBody});
Neither of these seem to work. I have also tried.
this.submitForm({cURL: encodeURI(erEmailURL), cSubmitAs:"XML", cCharSet:"utf-8"});
this.submitForm({cURL:"mailto:" + erAgent + "&subject=" + erSub + "&body=" + erBody, cSubmitAs:"XML", cCharset:"utf-8"});
Again, seemingly not working.
Can anyone point out my mistake? or point me in the right direction.
Thanks for reading. :)