XFA support in XDP-based adaptive forms
CREATED FOR:
- User
- Developer
Introduction
Adobe recommends using the modern and extensible data capture Core Componentsfor creating new Adaptive Formsor adding Adaptive Forms to AEM Sites pages. These components represent a significant advancement in Adaptive Forms creation, ensuring impressive user experiences. This article describes older approach to author Adaptive Forms using foundation components.
Adaptive forms supports various XFA events, properties, scripts, and validations defined in an XDP file, including:
- Execution of scripts defined on events in the XDP file.
- Capturing default values and behavioral properties for fields in the XDP file.
- Execution of validation scripts defined in the XDP file.
When an adaptive form is created based on an XDP file, the properties, events, and validations are auto-populated in the form authoring UI. However, form authors can override some of these elements to create an alternate experience.
This article lists supported XFA events, properties, and validations honored in adaptive forms and explains how to override them in adaptive forms.
Supported XFA elements and their mapping in adaptive forms
Fields
When an adaptive form is created using an XDP file, you can drag-drop an XFA field onto the adaptive form. The following table lists how XFA fields are mapped to adaptive form fields.
XFA field or container | Corresponding adaptive form component |
Button | Button |
Check Box | Check Box |
List Box | Drop-down List |
Date/Time Field | Date Picker |
Signature Scribble | Scribble Signature |
Numeric Field | Numeric Box |
Decimal Field | Numeric Box |
Text Field | Text Box |
Password Field | Password Box |
Image | Image |
Text | Text |
Subform | Panel |
Area (Group) | Panel |
Subform Set | Panel |
Properties
The following table captures how various XFA scripts defined in the XDP files behave in adaptive forms.
XFA component properties | Corresponding behavior in adaptive forms |
somExpression | Mapped to the Bind reference (bindRef) property in adaptive form. |
presence | Mapped to the visible property in adaptive form. You can override it using the Visibility expression. |
access | Mapped to the enabled property in adaptive form. You can override it using the Access expression. |
Accessibility: role | Mapped to the role property in adaptive form. |
Accessibility: speakPriority | Mapped to the speakPriority property in adaptive form. |
Accessibility: speakText | Mapped to the custom Accessibility text in adaptive form. |
Accessibility: toolTip | Mapped to the short description property in adaptive form. |
caption (all Field types) | Mapped to the Title property in adaptive form. |
displayFormat (all Field types) | Mapped to the Display Pattern in adaptive form. |
rawValue (all Field types) | Mapped to value property in adaptive Form. |
items (List Box, Check Box) | Mapped to options property in adaptive form. You can override it using the Options expression. |
maxChar (Text Field) | Mapped to the Maximum characters allowed property in adaptive form. |
multiline (Text Field) | Mapped to the Allow multiple lines property in adaptive form. |
fracDigit (Numeric Field, Decimal Field) | Mapped to the Frac digits property in adaptive form. |
leadDigit (Numeric Field, Decimal Field) | Mapped to the Lead digits property in adaptive form. |
multiSelect (List Box) | Mapped to the Allows multiple selection property in adaptive form. |
Scripts
The following table captures how various XFA scripts defined in the XDP file behave in adaptive forms.
Validations
The following table captures how XFA validations map to validations in adaptive forms.