Client-Side Scripting, Rules, and Custom Components
What to know
Adaptive Forms support visual rules (rule editor) and custom JavaScript via client libraries. Understand event types (initialize, value commit, click, submit) and rule constructs (condition, show/hide, enable/disable, set value, validate, invoke service). Know the guideBridge API for interacting with the form programmatically (e.g., guideBridge.getFormData, guideBridge.registerConfig).
Custom components
Custom components extend base components via clientlibs and JavaScript models (<component>.model.js). Understand the widget lifecycle and how to register a custom component in a proxy component under /apps. Know how custom functions are added to the rule editor (via a functions library clientlib).
Traps
A frequent trap is that visual rules and custom scripts can conflict - the last executed wins, and order matters. Another is assuming guideBridge is available before the form is initialized; it is not. Questions also test that custom functions must be registered in the correct clientlib category to appear in the rule editor. Watch for confusion between client-side validation and server-side validation (both may be needed).
Rule of thumb
Use visual rules for maintainability; drop to custom JS only when the rule editor cannot express the logic (e.g., complex array manipulation or external API calls).
Worked example
To add a custom rule function isValidPostalCode, create a clientlib with category matching the form's functions library, register the function, and reference it in a rule. If it does not appear in the editor, the clientlib category is wrong.