TXFAWidgetRuntime.InitializeForm

Unit: HPDFXFARuntime

Declaration

function InitializeForm: Boolean;

Behaviour

Runs initialize events in template order, then calculate, validate, form ready and stable layout ready, all within one transaction

Returns True after success and on subsequent calls after a successful initialisation; a failure returns False and sets LastDiagnostic

Instances created by lifecycle handlers receive initialize before ready events; after initialisation, DispatchEvent and CommitEdit automatically initialise new occurrences and run the post-change lifecycle

Failures restore XDP bytes, widget state, focus, edit state, counters and initialisation bookkeeping; host callbacks publish only after success

Call after configuring runtime options and callbacks; construction does not execute lifecycle scripts

Related APIs

Interactive Dynamic XFA Widget Runtime, FormCalc Functions and XFA Packet DOM