AEM Forms · updated
How the AEM Forms rule editor works for core component forms
The rule editor is a visual tool for adding behaviour to a form: show or hide a field, enable or disable it, set or validate a value, or call a service. A rule is a condition plus one or more actions. On Cloud Service there is no code editor; custom logic goes into custom functions that rules can call.
In plain words
A rule reads like a sentence: when the visitor chooses 'Other', show the 'Please describe' box. Business users can write most rules themselves. Developers add reusable functions for anything the built-in choices do not cover.
What a rule can do
- Show or hide an object
- Enable or disable an object
- Set a value for an object
- Validate the value of an object
- Run a function to compute a value
- Invoke a Form Data Model service
- Set a property of an object
Rule types and the two shapes of a rule
| Shape | Rule types | Use it when |
|---|---|---|
| Condition, then action | When | One condition should trigger several actions, or the action should run as soon as a value changes |
| Action, then condition | Show, Hide, Enable, Disable, Set Value Of, Validate | One action depends on several conditions |
For Show and Enable the alternate action is fixed: Show falls back to Hide and Enable to Disable, and the other way round. The editor only offers the rule types that make sense for the selected object; a panel, for example, has no Validate or Set Value Of.
Who can do what
Adobe states that users in the forms-power-users group can create scripts and edit existing ones, while users in the forms-users group can use scripts but not create or edit them.
What changed from AEM 6.5
Adobe's list of differences says Cloud Service provides a hardened rule editor and that the code editor is not available. The Migration Utility converts rules written in the code editor into custom functions. The onSubmitError and onSubmitSuccess functions are available as actions in the rule editor.
How to write a rule that stays maintainable
- Decide which field the rule belongs to: Adobe's rule of thumb is to think from the object you are writing the rule on.
- If one condition drives several fields, write one When rule on the field being checked rather than a Show or Hide rule on each target.
- If one field depends on several conditions, write a Show, Hide or Set Value Of rule on that field.
- Move repeated logic into a custom function and call it from the rule.
- For values filled in on the server, such as prefill, use a When rule that runs when the field is initialised.
Related tools and pages on this site
- AEM Forms readiness check (free, runs in your browser)
- Adaptive form generator (free, runs in your browser)
Questions
Is the code editor available on AEM Forms as a Cloud Service?
No. Adobe states the code editor is not available on Forms as a Cloud Service; custom functions take its place.
Can a rule call a back-end service?
Yes. A rule can invoke a Form Data Model service and use its output, for example to fill several fields from one lookup.
What rules can a spreadsheet form on Edge Delivery Services use?
Adobe's comparison lists them as limited: show or hide, compute a value, and custom functions. In the sheet these are the Visible Expression and Value Expression columns.
Sources
- Adobe: Introduction to Rule Editor for Adaptive Forms based on Core Components (checked 13 Nov 2026)
- Adobe: Difference between AEM 6.5 Forms and AEM Forms as a Cloud Service (checked 13 Nov 2026)
- Adobe: Use Form Data Model (FDM) (checked 13 Nov 2026)
- Adobe: How to author forms in AEM (foundation, core, Edge Delivery and headless compared) (checked 13 Nov 2026)
Facts about Adobe's products on this page are from the linked Adobe pages, read on the date shown beside each. Explanations, steps and examples are ours unless marked as Adobe's. If Adobe's page and this one differ, Adobe's page is right.
Surge Migrate is not affiliated with Adobe and claims no Adobe partner status. Adobe product names are trademarks of Adobe.