Expand description
Scripting integration — run FormCalc calculate/validate scripts on form fields.
Implements XFA Spec 3.3 §14.3.2 event model for calculate and validate events. Before layout, the engine executes calculate scripts on fields to compute derived values, then optionally runs validate scripts to check constraints.
NOTE: This module handles simple calculate/validate scripts with a flat
interpreter. The more advanced dynamic scripting (initialize events,
SOM-based field resolution, presence toggling) lives in
pdf-xfa/src/dynamic.rs which uses the full FormTree SOM resolver.
Structs§
- Script
Result - Result of running all scripts on a form tree.
Enums§
- Script
Error - Errors from script execution.
Functions§
- prepare_
form - Run calculate scripts, then layout. Convenience wrapper for the common flow.
- run_
calculations - Execute all calculate scripts in the form tree, updating field values.
- run_
validations - Execute all validate scripts in the form tree, collecting failures.