Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Order of execution of automation objects in xfa

Level 1
Level 1

I have a xfa form in pdf which is usually opened in acrobat reader DC. The template in this defines some validation objects in a field. Inside the validation there are both formatTest and scriptTest altogether. The script can edit the rawValue of the field, and has to do it before it is validated with the rules of picture clause. The code below is an example:


<validate><picture>HH:MM:SS</picture><script contentType="application/x-javascript">if (this.rawValue>=0) false; else this.rawValue="10:15:35";</script><message><text name="formatTest">Some format message</text><text name="scriptTest">Some script message</text></message></validate>


This works even if it shouldn't, in fact the value is edited in the validation script Before the format validation occurs. This is the desired behaviour, but in contrast to the specification which says that the order of validations is nullTest, then datatype test, then formatTest, and only latest is scriptTest. However if i change the picture clause specification to be DD/MM/YY (and the script accordingly) so that instead of time now we have date, the script is executed after format validation and even after it is formatted. In this case i opted to put the script in calculation object, only to discover this doesn't work either, which is strange, because according to specification calculate precedes validate. Any possible event is executed later as well.
Does exist a method to execute formatTest validation after a script if the picture is "DD/MM/YY"(or if field is a date object)? Is this a bug?


Topics help categorize Community content and increase your ability to discover relevant content.

0 Replies