Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Doing CancelAction in PreSave Event of the Form is not working

Avatar

Level 2
Giving the following Code in PreSave Event of Form is not working properly.



xfa.event.cancelAction = true;

xfa.host.messageBox("PreSave - Came In" + xfa.event.cancelAction);



This piece of code always displays the message as "PreSave - Came In false", While execution.



Basically, I am trying to do the following:

I have Right Enabled PDF's, so that User can Save that PDF

Inside the PDF, I have few Fields that should give me a total of 100. [5 Decimal Field's Value equalling 100]

User Opens that PDF and enters value in those 5 fields

If User attempts to save, the Script present inside the PDF will Prompt the User saying that "Valus is not Equal to 100" and also the Script should cancel the Save Event trigerred by the User.



Please give me guidance in doing this...



Thanks in Advance



With Regards

SriRamu SR
1 Reply

Avatar

Level 3

This property applies only to the following scripting events:

prePrint, preSubmit, preExecute, preOpen, and preSign

Please visit the link for details. http://help.adobe.com/en_US/livecycle/9.0/designerHelp/index.htm?content=001046.html