Я пытаюсь получить значение поля почасовой / годовой зарплаты и уточнить его при отправке на электронную почту.Это документ в формате PDF, написанный на Javascript.
if (this.getField("Signature").value==""){
app.alert("Please Sign the Document Before Submitting")
}
else {
// 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 = ""
var cCCAddr = "";
var cBCCAddr = "";
var oField = this.getField("Hourly/Annual"); // get a field name's object;
function getval() {
app.alert(oFieldName + " has a value of: " + GetField(oFieldName).value);
}
getval()
// Set the subject and body text for the email message
var cSubLine = ""
var cBody = ""
// Send the entire PDF as a file attachment on an email
if (this.getField("Ch1").value=="Yes") {
this.mailDoc({bUI: true, cTo: cToAddr, cCc: cCCAddr, cBcc: cBCCAddr, cSubject: cSubLine, cMsg: cBody});
}
else if (this.getField("Ch2").value=="Yes") {
this.mailDoc({bUI: true, cTo: cToAddr, cCc: cCCAddr, cBcc: cBCCAddr, cSubject: cSubLine, cMsg: cBody});
}
else if (this.getField("Ch3").value=="Yes") {
this.mailDoc({bUI: true, cTo: cToAddr, cCc: cCCAddr, cBcc: cBCCAddr, cSubject: cSubLine, cMsg: cBody});
}
else {
this.mailDoc({bUI: true, cTo: cToAddr, cSubject: cSubLine, cMsg: cBody});
}
{
app.alert("")
}
}
Я добавил функцию get val
getval() {
app.alert(oFieldName + " has a value of: " + GetField(oFieldName).value);
}
getval()
, но она не оповестит меня идентификатором поля.Почему это так и как я могу это исправить?