AEM Forms as a Cloud Service: Code Editor not available in Adaptive Forms Rule Editor

Adobe Experience Manager as a Cloud Service (AEMaaCS) doesn’t include the Code Editor previously available in the Adaptive Forms Rule Editor in AEM Forms On-Premises because the feature is deprecated and only the visual Rule Editor is supported for authoring rules. As a result, you can’t create or edit custom JavaScript directly within the Rule Editor interface. To resolve the issue, use the visual Rule Editor and migrate existing custom rule scripts to custom functions.

Description description

Environment

Adobe Experience Manager as a Cloud Service (AEMaaCS) - Forms, all versions

Issue/Symptoms

  • The Code Editor previously available in the Adaptive Forms Rule Editor in AEM Forms On-Premises isn’t present in AEM Forms as a Cloud Service.
  • Only the visual Rule Editor (GUI/WYSIWYG) is available for authoring rules.
  • There’s no option to switch to a code or script editor for custom JavaScript within the Rule Editor interface.
  • No error messages appear because the feature isn’t available.

Root cause

The Code Editor is deprecated and isn’t available in AEM Forms as a Cloud Service. Only the visual Rule Editor is supported for authoring rules.

Resolution resolution

Follow the steps below to resolve the issue:

  1. Use the visual Rule Editor available in the Cloud Service environment to author rules.
  2. If your Adaptive Forms contain custom rule scripts developed with the Code Editor in On-Premises versions, use the Migration Utility to convert the scripts into custom functions.
  3. Implement complex business logic as custom functions in a client library.
  4. Deploy the client library through the Cloud Manager pipeline.
  5. Invoke the custom functions from the visual Rule Editor as needed.
  6. Review the official documentation for more information about the differences between AEM Forms On-Premises and AEM Forms as a Cloud Service.
recommendation-more-help
experience-cloud-kcs-help-kbarticles