activity

Specifies the name of the event.

The accompanying ref property must specify an object that can generate the named event.

Syntax

Reference_Syntax.activity = "change | click | docClose | docReady | enter | exit | full | initialize | mouseDown | mouseEnter | mouseExit | mouseUp | postExecute | postPrint | postSave | preExecute | prePrint | preSave | preSubmit | ready | validationState"

Values

Type

Value

String

change

Occurs when the user performs an action such as pasting text. Here are more examples of actions that trigger the change event:

  • With each key-stroke

  • When text is pasted

  • When a new choice is selected

  • When a check box is selected

  • When an item is selected

click (default)

Occurs when the user clicks in the field. Most systems define click as pressing and releasing the mouse button while not moving the pointer beyond a very small threshold.

docClose 

Executes at the very end of processing a form, if, and only if, all form validations complete with no errors. This event comes too late to modify a saved document. The purpose is to provide the ability to generate an exit status or completion message.

docReady 

Executes prior to the rendering of the document, but after data binding of the data takes place.

enter 

For a field, occurs when the field gains keyboard focus. For a subform or exclusion group, occurs when some field within the subform or exclusion group gains keyboard focus, that is, keyboard focus moves from outside the object to inside it.

enter 

For a field, occurs when the field gains keyboard focus. For a subform or exclusion group, occurs when some field within the subform or exclusion group gains keyboard focus, that is, keyboard focus moves from outside the object to inside it.

exit 

For a field, occurs when the field loses keyboard focus. For a subform or exclusion group, occurs when all fields within the subform or exclusion group lose keyboard focus, that is, focus moves from inside the object to outside it.

full 

Initiates when the form filler attempts to enter more than the maximum allowed amount of content into a field.

initialize 

Executes after data binding is complete. A separate event is generated for each instance of the subform in the form model.

mouseDown 

Occurs when the user presses the mouse button in the field, but before the button is released.

mouseEnter 

Occurs when the user drags the pointer over the field without necessarily pressing the button.

mouseExit 

Occurs when the user drags the pointer out of the field without necessarily pressing the button.

mouseUp 

Occurs when the user releases the mouse button in the field.

postExecute 

Occurs when data is sent to a web service via WSDL, just after the reply to the request has been received and the received data is marshalled in a connectionData object underneath $datasets. A script triggered by this event has the chance to examine and process the received data. After execution of this event, the received data is deleted.

postPrint 

Occurs just after the rendered form has been sent to the printer, spooler, or output destination.

postSave 

Occurs just after the form has been written out in PDF or XDP format. Does not occur when the data model or some other subset of the form is exported to XDP.

preExecute 

Occurs when a request is sent to a web service via WSDL. A script triggered by this event has the chance to examine and alter the data before the request is sent. If the script is marked to be run only at the server, the data is sent to the server with an indication that it should run the associated script before performing the rest of the processing.

preSave 

Occurs just before the form data is written out in PDF or XDP format. Does not occur when the data model or some other subset of the form is exported to XDP. XSLT postprocessing, if enabled, occurs after this event.

preSubmit 

Occurs when data is submitted to the host via the HTTP protocol. A script triggered by this event can examine and alter the data before it is submitted. If the script is marked to run at the server, the data is sent to the server, with an indication that it should run the associated script before performing the rest of the processing.

ready 

Occurs when the model has finished loading.

validationState

Fires when the validation state of a field, subform, or exclusion group changes. The validation state is considered to change when it transitions between a valid and invalid state, or when the test that caused the invalid state changes.

The intended use of the event is to change the appearance of fields when they become valid or invalid.

The event . target property is populated with the container object whose validation state has changed.

The event.name property is populated with the activity name ( validationState ).

When a field, exclusion group or subform is initialized, the validationState event fires immediately following the initialize event for that object.

The event should fire again only when the validation state changes. However, form logic should be robust enough to allow the event to fire even if the validation state has not actually changed.

The validationState event fires only after the validation state has been evaluated for all objects included in the validation operation.

You can determine whether the event target is valid by testing whether the $event. target . errorText property has a value.

Applies to

Version

XFA 2.1

Examples

JavaScript

TextField1.event.activity = "mouseEnter";

FormCalc

TextField1.event.activity = "mouseEnter"

// Ethnio survey code removed