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.

AEM Form perform background validations?

Avatar

Level 2

Hello everyone,

 

i'm working on a sort of PDF form validation.

We have some PDF that needs to be validated and tested automatically. These PDF are provided with internal javascript that simple test PDF fields input and returns the results in a hidden page of the PDF itself.

The PDF are automaticallty filled using an xml containing the field values. This is done using a service created in Adobe AEM Forms, through the Workbench.

The service merges the XDP file with the XML file producing a filled PDF.

My question is:

If i fill the PDF that way, it's possible to fires up the PDF internal javascript in order to perform the PDF validation and produces the log? I would like to do this automatically, without opening the PDF.

6 Replies

Avatar

Employee Advisor

@AmiAdobe  Use case looks fine to me but what do you mean when u say "produces the log"?

Avatar

Level 2

Long story short... By saying "produces the log" i mean the validation results. Assuming i have i field named "age", that should accept integer only values, but the users fills the field with the string value such "hello".... The validation result should report some kind of log telling me: "the user have entered "hello" for the field name "age". Since the fields have some javascript attached and performs validation, when the pdf are filled (with an automated process) i need to read the result of this validation. I thought at first to send the log to the PDF itself by populating hidden fields and then save the PDF or send the result via HTTP using a submit button. At the moment i'm using the docReady event to raise or launch the validation process and sending the results to the hidden field mentioned earlier, but i need to open the PDF to do this. I wonder if this process could work automatically using an AEM process. The files (both an xdp and an xml) are sent to the input folder of the process. The process fill in the the document and produces a PDF in the output folder of the process. At this moment the inner events that generate the log could be fired automatically and without opening the PDF? Or... it is possible to send the log in some way without open the PDF?

Avatar

Employee Advisor
@AmiAdobe I doubt we have something that can help with this testing out of the box.

Avatar

Employee Advisor
@AmiAdobe if you have the workbench, I think writing in a field in a hidden field make much more sense. Let the render form service merge the data and hidden field and you can trace the data later

Avatar

Level 2
Manged to execute an event main document docReady that write to a text field. This works when we pass the document to the input folder

Avatar

Level 2
Manged to execute an event ib the document docReady that write into a textfield. When we pass the document to the input folder of our process, the event fires and write some text in a textfield and This happens without opening the pdf, so the event is executed in "background" at server side. Btw, we cannot manage to call a function (in docReady) that perform validation and fill a textfield on server side. The function works if we open the PDF, but doesn't work if we use the process we defined.