Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Validate Signature field is signed

Avatar

Level 4

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);}}

1 Accepted Solution

Avatar

Correct answer by
Level 2

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]".

View solution in original post

1 Reply

Avatar

Correct answer by
Level 2

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]".