Hi,

I'd like to test the values of certain acroform fields using the AR built 
in validation methods, such as AFDate_KeystrokeEx( someDateFormat ).

What I've learned so far from reading Adobe's JS guide is that one has to 
do this on the _javascript_ level.

So here's what I do:

-----------CUT----------
PdfFormField field = pdfWriter_.getAcroForm().addSingleLineTextField( fieldname, content, base_font, font_size, llx, lly, urx, urx );

String datechecker = "this.getField(\""+fieldname+"\").setAction( \"Validate\", \"AFDate_KeystrokeEx( 'dd-mmm-yyyy' )\" ) ;\r";
PdfAction validator = PdfAction._javascript_( datechecker, pdfWriter_ );

field.setAction( validator);
-----------CUT----------

Yet the field is actually never validated, obviously the AFDate_KeystrokeEx method is never called.

... where am I wrong here?

TIA

Udo Rader
-- 
BestSolution.at EDV Systemhaus GmbH
http://www.bestsolution.at

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to