Installation
Install a separate add-on to have the Adaptive Forms feature for your AEM environment. Here is a list of add-ons available for different operating systems.
The Adaptive Forms feature, available in AEM 6.5 QuickStart, is designed for exploration and evaluation purposes only. For production use, it is essential to obtain a valid license for AEM Forms, as Adaptive Forms functionality requires proper licensing.
Support for Adaptive Forms was added in version 5.8.60 of the AEM Touch Connector.
Use this guide to help you create your first adaptive form.
Configuration
Cloud configuration
You may assign a cloud configuration to an adaptive form on the creation wizard page
or you can specify the configuration as it is done for every other content type in the properties window:
⚠️ Known issue: AEM cannot resolve the applied cloud configuration and uses /conf/global as a fallback for a translation project.
💡 Solution: You should use inheritance of cloud configuration in AEM. Apply the configuration to the folder where the form resides.
A note from Adobe:
Please note that the Cloud Configuration Container used in the Adaptive Form properties is different from the one visible in the Translation Project properties page, and the two cannot be merged or used as a single configuration.
The inheritance concept applies to Sites because the Cloud Configuration Container defined in the Sites settings can also be used for translation. However, this behavior does not apply to Forms.
For example, if you create a form that requires both Adobe Sign or reCAPTCHA configuration and translation, the configurations for Adobe Sign or reCAPTCHA are specified under the Cloud Configuration Container in the Adaptive Form properties. If you manually modify this property to point to the translation configuration (using this workaround solution), you will no longer be able to add or use other configurations, such as Adobe Sign or reCAPTCHA, within the same container.
Therefore, the Cloud Configuration Containers for Forms properties and Translation are separate and serve distinct purposes.
However, there is another issue: AEM doesn't show the Properties button for a form folder. Use the following workaround:
- Copy the path for your form folder.
- Go to Assets and open properties for any folder.
- Replace the path in the browser address bar with the path to your form folder.
- Input the proper cloud configuration and save changes.
In the adaptive form properties, you should see that the configuration from the folder was inherited.
AEM Translation Framework will now be able to resolve the configuration properly.
In brief, cloud configuration should be applied to both the form and the parent folder.
Source language
English language is defined as the source language by default. This is done with a special property applied to the form. Here is how to find it:
In the example, we have the following adaptive form. Take a look at the path mentioned in the browser's address.
Let's find this form in CRX DE.
However, an adaptive form consists of two parts that reside separately. We should find the second part under /content/forms/af.
Take a look at jcr: content properties of the form.
AEM Translation Framework uses this property as the source language for a translation project. If this property is omitted or blank, en will be used by default.
Target languages
AEM allows you to translate an Adaptive Form into several languages out of the box, but if you need to add more languages, you should go to OSGi Guide Localization Service.name (Guide Localization Service) configuration.
Standard way to translate a form
As the forms don't have language copies, you cannot use the Reference Panel for translation. Instead, select your form and click the Add Dictionary button.
You will need to fill in several input fields. The Source Language field is read-only. (See the explanation above for details on how to manage source languages.)
After you click Done, new translation project(s) will be created in the root Projects folder.
Preview a translated form
There is a standard way to preview a form. Select a form, click the Preview button, and choose Preview as HTML.
The form will be shown in the source language. To preview it in the target language, set the afAcceptLang parameter to the desired target language (e.g., afAcceptLange=de).
Translate using the Smartling Dialog
Smartling's AEM Connector allows you to translate a single form at a time; batch translations are not supported. Select the form and click the Translate button.
The standard Smartling Dialog will open for the form.
The dialog works the same way as the out-of-the-box Smartling connector request translation flow. The connector requests AEM to resolve the applied cloud configuration and checks the source language applied to the form.
Adaptive forms do not support multi-language translation projects. As a result, separate translation projects will be created, one project for each target language.
Additional technical details
There are several content types that the AEM Translation Framework can send for translation: PAGE, CONTENTFRAGMENT, ASSET, and I18NDICTIONARY. Adaptive forms are translated using the last type, I18NDICTIONARY.
Be sure to check where the translation will be applied. You can check this path in CRX DE.
This is the classic i18n approach: every node is a key/message pair, and the language is defined by the parent node name.
⚠️ Issue: AEM sends a specific node of the form for translation. For example, for fr language, the path /content/dam/formsanddocuments/test-adaptive-forms/test-form/jcr:content/dictionary/fr will be sent.
For the first translation, AEM takes all the strings from the form, creates an fr node, populates it with the strings, and requests translation. At this step, all messages under fr are in English (by default).
Let's imagine the translation flow is complete. The fr translation was delivered and applied. Now all messages under fr are in French. What if the user adds a field to the form (for example, Address) and wants to send it for translation again? AEM will populate the fr node with the new message and create a job using the existing fr node. This means existing French messages will be sent for translation, resulting in the following:
<?xml version="1.0" encoding="UTF-8"?><translationObjectFile fileType="I18NDICTIONARY" sourcePath="/content/dam/formsanddocuments/test-adaptive-forms/test-form/jcr:content/dictionary/fr"> <translationObjectProperties> <property isMultiValue="false" nodePath="/content/dam/formsanddocuments/test-adaptive-forms/test-form/jcr:content/dictionary/fr/e15bc38c-c723-4ed2-ba2c-f854335ce7af" propertyName="sling:message">Panneau racine</property> <property isMultiValue="false" nodePath="/content/dam/formsanddocuments/test-adaptive-forms/test-form/jcr:content/dictionary/fr/49c909b6-a0c7-4111-9e0f-d7e2f99a9325" propertyName="sling:message">Nom</property> <property isMultiValue="false" nodePath="/content/dam/formsanddocuments/test-adaptive-forms/test-form/jcr:content/dictionary/fr/cb413482-42bb-48d1-afde-65953cdfb7fa" propertyName="sling:message">Âge</property> <property isMultiValue="false" nodePath="/content/dam/formsanddocuments/test-adaptive-forms/test-form/jcr:content/dictionary/fr/03f26c5c-6784-4dfd-8979-c1ceafecbc1a" propertyName="sling:message">État civil</property> <property isMultiValue="false" nodePath="/content/dam/formsanddocuments/test-adaptive-forms/test-form/jcr:content/dictionary/fr/6c935223-227b-4727-a805-3cfc4b0e406f" propertyName="sling:message">Célibataire</property> <property isMultiValue="false" nodePath="/content/dam/formsanddocuments/test-adaptive-forms/test-form/jcr:content/dictionary/fr/b6e63927-ad3d-47ed-8b08-9962402803c9" propertyName="sling:message">Marié</property> <property isMultiValue="false" nodePath="/content/dam/formsanddocuments/test-adaptive-forms/test-form/jcr:content/dictionary/fr/8ff78e60-3d97-4246-83e5-47803dde21ef" propertyName="sling:message">Address</property> </translationObjectProperties> </translationObjectFile>
The Smartling TMS will not recognize that some strings are already translated and will ingest them again for translation. This means translated strings will appear as source strings in Smartling. As a result, you could potentially pay for translation twice: English → French + French → French. However, you can manually exclude these strings from translation within Smartling to avoid this.