Adaptive Forms display undefined messages for custom locales in AEM Forms

Adobe Experience Manager (AEM) Forms Adaptive Forms may display undefined instead of translated runtime messages for custom locales when required localization keys, such as showingField and hidingField, are missing from the custom language dictionary. To resolve the issue, add the missing keys with the appropriate translations, deploy the updated localization file, clear the relevant caches, and verify the localized form.

Description description

Environment

  • Adobe Experience Manager (AEM) Forms
  • Adaptive Forms
  • Custom (non-English) locale configuration

Issue/Symptoms

  • Adaptive Forms display undefined instead of the expected runtime messages for a custom locale.
  • The issue may occur during actions such as showing or hiding fields.
  • The English locale displays the expected message, while the custom locale returns undefined for the same runtime keys.
  • The issue affects the usability of localized forms.

Root cause

Required runtime localization keys, such as showingField and hidingField, are missing from the custom language dictionary after migration or customization.

Resolution resolution

Follow the steps below to resolve the issue:

  1. Locate the custom locale’s localization file in the AEM project. For example: /apps/<project>/clientlibs/clientlib-locale/<locale>/javascript/LogMessages.js
  2. Open the localization file and check for the required runtime keys, such as showingField and hidingField.
  3. If the keys are missing, add them with the appropriate translated values. Preserve any placeholders, such as {0}, used by the runtime.
  4. Compare the English localization dictionary with the custom locale dictionary and add any other missing runtime keys.
  5. Deploy the updated localization file to the Development or testing environment.
  6. Clear or invalidate the relevant client-library, Dispatcher, and browser caches to ensure that the updated localization entries load in the browser.
  7. Test the Adaptive Form in the affected locale, especially actions that show or hide fields, and confirm that the correct translated messages appear instead of undefined.
  8. After validating the changes, promote them to the Production environment following the standard deployment process.
recommendation-more-help
experience-cloud-kcs-help-kbarticles