Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

Printing Required Fields

Avatar

Former Community Member
I am still learning my way around LiveCycle and need some help. I have developed an Application in LiveCycle ES 8.2, I want to set certain fields as "Required". I also want to make sure the Application can't be "printed" unless all "Required" fields are complete. Any help available?



I also have an Application not developed in LiveCycle that I have been able to set the "Required" setting but can't seem to set the Print to only print once all "required" fields are complete. Could use help here too!



Thanks Everyone
5 Replies

Avatar

Former Community Member
You woudl create a button (called Print), you could check all of the required fields and if they check out then do the print.



Note that this does not stop the user from hitting Ctrl-p or File/print. To do that you could use the pre-print event

Avatar

Level 2
Hi,



I'm facing a similar situation. I already found out a solution based on the pre-print event. But is there any way to cancel the print-event?

Avatar

Former Community Member
Yes ...have a look in the screpting reference at the cancelAction method. Your code woudl loook like this:



xfa.event.cancelAction = 1

Avatar

Level 2
Thanks! That's helps a lot... but now I get an anoying popup that 'print was cancelled'. Is there any way to suppress that?