Filling form data into email using app.mailMsg
Hi! I am trying to pull form data from a PDF document and place it in an email using app.mailMsg - I have a button placed on the page where the data will come from with a mouseup trigger. I've cleaned up the data and email structure that I want to use a few times so I'm not sure if there is an error in my code/syntax (I'll paste below) or it is something that I am completely oblivious to. Any help is greatly appreciated! Thank you!
var cMyMsg = "DOEE Notification\n\n"
cMyMsg += "Client Name: " + this.getField("custName").value + "\n";
cMyMsg += "Date Inspected: " + this.getField("inspectionDate").value + "\n";
cMyMsg += "Address: \n";
cMyMsg += "Structure Type: " + this.getField("structureType").value + "\n";
cMyMsg += "Year Built: " + this.getField("yearBuilt").value + "\n";
cMyMsg += "Owner: " + this.getField("buildingOwner").value + "\n";
cMyMsg += "Building Structure Consists of:\n";
cMyMsg += " *Framing: " + this.getField("typeStudFraming").value + "\n";
cMyMsg += " *Walls: " + this.getField("typeWalls").value + "\n";
cMyMsg += " *Floors: " + this.getField("typeFloors").value + "\n";
cMyMsg += " *Ceiling Height: " + this.getField("maxCeiling").value + "\n";
cMyMsg += "Approx Amt of Visible Mold: ≈" + this.getField("amountMold").value + "\n";
cMyMsg += "Lead and/or Asbestos Testing:\n";
cMyMsg += " *Lead: " + this.getField("testLead").value + "\n";
cMyMsg += " *Asbestos: " + this.getField("testAsbestos").value + "\n";
cMyMsg += "Love,\n";
cMyMsg += "Name Here\n";
cMyMsg += "Director of Production & 3rd Degree White Belt\n"
cMyMsg += "DOEE License: 867-5309\n";
app.mailMsg({
bUI: true,
cTo: "email@gmail.com",
cSubject: "DOEE Info",
cMsg: cMyMsg
});
