I have given up. I have checked all the different discussions on this and I can't get it to work! Here is my code.
What am I doing wrong ! Please help
var oDoc = event.target;
var oState = event.target.getField("Main.DeptHeadApproval").signatureValidate();
{if (oState == 0)
{messagetext=messagetext + "\tDirector/Department Head Approval\n";
errorcount = errorcount + 1;}
if (errorcount == 0)
{OfficeUse.presence = "visible";
oDoc.mailDoc({
bUI: true,
cTo: "EnterpriseRisk@uillinois.edu",
cCc: UserEmail.rawValue + ";" + DeptHeadEmail.rawValue,
cSubject: "JCAD Risk User Set Up",
cMsg: "",
});}
else {xfa.host.messageBox("Missing Required Field(s):\n"+ messagetext);}}
Solved! Go to Solution.
getField's argument has to be the complete path to the signature field, including explicit instance indices, e.g. "form1[0].page1[0].Main[0].DeptHeadApproval[0]".
getField's argument has to be the complete path to the signature field, including explicit instance indices, e.g. "form1[0].page1[0].Main[0].DeptHeadApproval[0]".