Order of execution of automation objects in xfa

New Here ,
Feb 06, 2021 Feb 06, 2021

Copy link to clipboard

Copied

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 is 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
General troubleshooting, PDF forms, Standards and accessibility

Views

60

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Most Valuable Participant ,
Feb 06, 2021 Feb 06, 2021

Copy link to clipboard

Copied

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines