XFA Specification
Chapter 9, Automation Objects
Events
314
$event properties
The individual properties of
$event
are described below:
change
When a
change
or
full
event occurs, this property holds the text that is to be inserted or
updated. When referenced this property yields a string. Assigning to this property replaces the
typed or pasted text with the value assigned. For example, the following fragment shows a script
that converts the entered text to upper case:
<field … >
<event activity="change">
<script contentType="application/x-javascript">
xfa.event.change = xfa.event.change.toUpperCase();
</script>
</event>
</field>
The boundaries of the window are controlled by the
selStart
and/or
selEnd
properties.
commitKey
Describes what happened to the value in the field when the form field lost focus. The value of this
property must be one of:
0
The value was not committed (for example, the escape key was pressed)
1
The value was committed by a click of the mouse outside the field
2
The value was committed by pressing the enter key
3
The value was committed by tabbing to a new field
fullText
If the user pastes into a field, the field may truncate the pasted text. The full (untruncated) value is
stored in this property. Content type is indicated by
$event.newContentType
.
keyDown
A Boolean that is true if the arrow key was used to make a selection, otherwise false.
modifier
A boolean that is true if and only if the modifier key (the control or “Ctrl” key on Microsoft
Windows) was held down during the event.
name
Name of the current event as a text string.
newContentType
Content type of the new data. The value of this property must be one of:
allowRichText
Home Index Bookmark Pages
Pages: Home Index All Pages