Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Experience Manager Champion Program are open!

How can I check if validations was Successful on Form

Avatar

Level 2

Hello,

I have a Button on my form and I have the code :

 

xfa.form.execValidate();

my additional code .... ;

If this validation is successful (but only if it is successful then I want this button to run addtional code.  Currently the way I have it, the form does the vaidation properly, but then it always runs this additional code.  How can I do a check to say if validation successful then turn additional code?

thx for any help.

1 Reply

Avatar

Level 2

I solved my own problem and thought I would post the code in case it helps someone else:

 

//Validate the entire form. If there are no validation errors then

//send this email 

 

if

( xfa.form.execValidate() == true

)

}

 

else

 

{

}