XFA Specification
Chapter 12, User Experience
Widgets
352
User Supplies Data to the Field
After selecting the field, the user may enter date, time, or date-time data for the field. The data may be
entered in any of the following formats:
●
●
●
As specified by the ui picture clause
Localized format, as specified in the localeSet picture clause for the locale
Canonical format
If the data is incompatible with the field content type, the XFA processing application produces an error
response, only if the field includes a validation test or some other script that verifies the data type.
If the field, as represented in the XFA Data DOM, does not yet contain a value property, the widget creates
a date-time value for it, adding the data in canonical format. The sample below illustrates the value
property created in the XFA Form DOM. The date-time content type is chosen regardless of the value
entered.
<field … >
<ui>
<dateTimeEdit/>
</ui>
<value>
<dateTime>date-time
data</dateTime>
</value>
</field>
User De-Selects the Field
After the user de-selects the field (by pressing the enter key, tabbing out, or selecting another field), the
field’s data is displayed as follows:
●
●
As specified by the field’s format picture clause, provided the data matches the picture clause.
Localized format, using the picture clause specified for the locale in the localeSet, provided the data
conforms to the canonical format for the content type. Unless otherwise specified, localization is
always done for the current locale.
Canonical format. If the data does not conform to the canonical format, it is displayed as is.
●
After the user de-selects the field, the entered data is propagated to the XFA Data DOM.
See “Localization and Canonicalization” on page 140.
Default UI
The default UI widget (
defaultUi
content type. During form fill-in, the appearance and interaction of the default UI widget is determined by
examining the content type of the field. For example, if the content is a number, a numeric editing widget
is used. This element can also supply additional hints to a custom GUI via its extras child.
Form designers use the default UI widget when the type of data to be bound to the field is not known at
the time the template is created.