Register custom widget with XFA Scripting Engine 

When the custom widget code is ready, register the widget with the scripting engine by using registerConfigAPI for Form Bridge. It takes widgetConfigObject as input.

window.formBridge.registerConfig("widgetConfig",
        {
        ".<field-identifier>":"<name-of-the-widget>"
        }
    );

widgetConfigObject

The widget configuration is provided as a JSON object (a collection of key value pairs) where the key identifies the fields and value represents the widget to use with those fields. A sample configuration looks like:

*{*

*"identifier1" : "customwidgetname",
"identifier2" : "customwidgetname2",
..
}*

where “identifier” is a jQuery CSS selector that represents a particular field, a set of fields of a particular type, or all fields. The following lists the value of the identifier in different cases:

Type of identifierIdentifierDescription
Particular field with name fieldnameIdentifier:“div.fieldname”All fields with the name ‘fieldname’ are rendered using the widget.
All fields of type ‘type’(where type is NumericField, DateField, and so on.):Identifier: “div.type”For Timefield and DateTimeField, the type is textfield as these fields are not supported.
All fieldsIdentifier: “div.field”

Announcements

Get hands-on with agentic AI.

Explore how AI agents work together through real examples and hands-on practice. Join your local User Group to design an agent workflow with your peers and leave with a practical framework you can apply to your own work.

Find an event

Ask AI

Not sure where to start?
Ask me anything about Adobe products.

Type your question or pick a suggestion below.

Use of this AI chatbot is subject to Adobe's Privacy Policy. Don't share sensitive data. AI responses are not your Content, may be inaccurate, and any offers provided are non-binding. Generative AI Terms.

Ask AI