Native XFA Scalar Value Properties

The event host creates actual native form value containers and scalar leaves through property access or getElement; field value properties, bound data values and widget reads share the same current value

Scalar creation

The supported scalar children are boolean, date, dateTime, decimal, float, integer, text and time, with one occurrence of one selected value class

const field = xfa.form.resolveNode("main.row[1].input");
const leaf = field.value.getElement("text", 0);
leaf.value = "updated";
field.dataNode.value = "from-data";
if (leaf.value !== "from-data") throw new Error("Value synchronization failed");

Reading a missing scalar property materializes its native form node and initializes its content from the field's current effective value; repeated access returns the same live property object

Value has common prototype attributes, override=0 and an empty relevant attribute by default; supported scalar classes expose common prototype attributes and an empty name

The one-of check includes all standard value choices, so a scalar cannot be created beside an existing image, exData or graphic value choice

Immediate and native synchronization

Scalar leaf value and rawValue accessors proxy the owning field; bound dataValue.value is a writable alias of its rawValue accessor

Field, scalar and data writes update each other's reads during the same script, including other fields that share the same bound data value

Native publication updates the dataset value and existing materialized scalar form leaves; interactive widget commits and calculation results also synchronize materialized value properties for bound fields, including hidden and invisible aliases

Typed scalar content is retained as supplied text, including canonical date, time and numeric strings; this stage does not introduce automatic numeric coercion or new picture formatting

Concealed alias synchronization follows actual repeated data scopes and preserves unmaterialized properties

Instances, identity and transactions

Creating and editing a value property in one repeated occurrence preserves the other occurrences; script objects can retain a scalar property reference for a later event

New repeated instances receive independent native value nodes; data writes to a newly created instance update its actual materialized scalar leaf before the transaction is saved

Engine errors, native value-budget failures and conflicting value choices restore exact native XDP bytes, including field data, materialized value leaves and shared aliases

Native synchronization scans participate in the event operation and elapsed-time budgets; excessive work rejects the transaction and restores its snapshot

Saved PDF output

XFA AcroForm conversion consumes the persisted scalar values for native field values and generated appearances; repeated first-instance values remain unchanged

The focused saved producer reopens the native XDP before conversion, and independent pypdf and MuPDF checks inspect typed form leaves, dataset values, native fields and actual visible appearance text

Remaining integration targets

Native exData XML supports absent value creation, real foreign XML import, immediate script serialization and persisted rich draw consumption

Draw and caption scalar consumers support created per-instance values and explicit empty overrides

Image and graphic value creation supports native image, arc, line and rectangle children with actual draw consumers

Complete scalar format validation, rich widget appearances and Unicode appearance embedding remain separate implementation targets

Related APIs

Native Data DOM, Native Field Defaults, Absent Property Creation and Interactive XFA Runtime