Native XFA UI Property Overrides

Units: HPDFXFA, HPDFXFARuntime and HPDFXFAEventScript

Creation and choice groups

Supported field and draw UI nodes expose extras and picture, plus a mutually exclusive widget choice: barcode, button, checkButton, choiceList, dateTimeEdit, defaultUi, imageEdit, numericEdit, passwordEdit, signature or textEdit

Each child has cardinality one; getElement and direct property access materialize supported absent properties beneath the actual form occurrence, sharing native creation budgets and transaction rollback

const row = xfa.form.resolveNode("main.row[1]");
row.input.ui.textEdit.multiLine = "1";
row.input.ui.textEdit.hScrollPolicy = "off";
row.password.ui.passwordEdit.hScrollPolicy = "off";
row.selection.ui.choiceList.open = "multiSelect";
row.selection.ui.choiceList.commitOn = "select";

Creating a conflicting widget choice fails the event transaction; extras and picture remain metadata and are skipped when selecting the effective UI widget

Defaults and supported child paths

UI, passwordEdit, choiceList and checkButton expose common id, use and usehref schema attributes

PasswordEdit defaults to hScrollPolicy=auto and passwordChar=*; choiceList defaults to open=userControl, textEntry=0 and commitOn=select

PasswordEdit, choiceList and checkButton support border, extras and margin children; textEdit retains its border, comb, extras and margin paths and its existing contextual defaults

CheckButton defaults to size=10pt, shape=square, mark=default and allowNeutral=0; automatic native Boolean creation consumes effective per-instance marker, border and scalar caption properties

setAttribute(value, name) remains available for explicit additional attributes; further widget-class defaults and child schemas continue as separate targets

Actual runtime and flatten consumers

The runtime rebuilds widget kinds from the effective UI for each repeated occurrence after successful events; created textEdit, passwordEdit and choiceList nodes become real text, password and list or combo controls

Field flattening uses the same effective UI selection, including a native form-only UI or a widget choice added to an empty or metadata-only template UI

UI attributes feed actual PDF field flags, including multiline and no-scroll text, password masking, multi-select and commit-on-select; declared item options and current bound values remain connected

Other repeated instances retain their prior UI and values; saved XDP reload and subsequent events continue to resolve created native UI property nodes

Saved text appearances

When AutoFormAppearances is enabled, XFA multiline text appearances honor explicit LF, CR and CRLF breaks and place each line separately

For supported single-byte text, word wrapping measures the effective standard font family and size; a word wider than the control is split into measured fitting prefixes, preserving all text characters in the generated appearance

Each emitted line consumes its effective left, center or right alignment and the existing native clipping rectangle

Coverage

Schema creation does not by itself add missing consumers for every widget choice; specialized image, barcode and default-widget behavior, custom password characters, richer widget text, Unicode embedding and additional value child creation remain active targets

Template-default initialization for a missing implicit dataset value and general prototype inheritance also remain separate work

Reference and related APIs

UI grammar and defaults follow the XFA 3.3 specification

Native Absent Property Creation, Native Property DOM and Interactive XFA Runtime