Send Email

You can use the Send Email Submit Action to send an email to one or more recipients on successful submission of the form. The email generated can contain form data in a predefined format. For example, in the following template, customer name, shipping address, name of the state, and zip code are retrieved from submitted form data.

```

Hi ${customer_Name},

The following is set as your deafult shipping address:
${customer_Name},
${customer_Shipping_Address},
${customer_State},
${customer_ZIPCode}

Regards,
WKND

```
NOTE
  • All the form fields must have different element names, even if the fields are placed on different panels of an Adaptive Form.
  • AEM as a Cloud Service requires outbound mail to be encrypted. By default, outbound email is disabled. To activate it, submit a support ticket to Requesting Access.

You can also include attachments and a Document of Record (DoR) to the email. To enable Attach Document of Record option, configure the Adaptive Form to generate a Document of Record (DoR). You can enable the option to generate a Document of Record from Adaptive Form properties.

Submit using Form Data Model (FDM)

The Submit using Form Data Model Submit Action writes submitted Adaptive Form data for the specified data model object in a Form Data Model (FDM) to its data source. When configuring the Submit Action, you can choose a data model object whose submitted data you want to write back to its data source.

In addition, you can submit a form attachment using a Form Data Model (FDM) and a Document of Record (DoR) to the data source. For information about form data model (FDM), see AEM Forms Data Integration.

Invoke an AEM Workflow

The Invoke an AEM Workflow Submit Action associates an Adaptive Form with an AEM Workflow. When a form is submitted, the associated workflow starts automatically on the Author instance. You can save the data file, attachments, and Document of Record to the payload location of the workflow or to a variable. If the workflow is marked for external data storage and configured for an external data storage, then only the variable option is available. You can select from the list of variables available for the workflow model. If the workflow is marked for external data storage at a later stage and not at the time of workflow creation, then ensure that the required variable configurations are in place.

The Submit Action places the following at the payload location of the workflow, or the variable if the workflow is marked for external data storage:

  • Data file: It contains data submitted to the Adaptive Form. You can use the Data File Path option to specify the name of the file and path of file relative to the payload. For example, the /addresschange/data.xml path creates a folder named addresschange and places it relative to payload. You can also specify only data.xml to send only submitted data without creating a folder hierarchy. If the workflow is marked for external data storage, use the variable option and select the variable from the list of variables available for the workflow model.

  • Attachments: You can use the Attachment Path option to specify the folder name to store the attachments uploaded to the Adaptive Form. The folder is created relative to the payload. If the workflow is marked for external data storage, use the variable option and select the variable from the list of variables available for the workflow model.

  • Document of Record: It contains the Document of Record generated for the Adaptive Form. You can use the Document of Record Path option to specify the name of the Document of Record file and path of file relative to the payload. For example, the /addresschange/DoR.pdf path creates a folder named addresschange relative to the payload and places the DoR.pdf relative to payload. You can also specify only DoR.pdf to save only Document of Record without creating a folder hierarchy. If the workflow is marked for external data storage, use the variable option and select the variable from the list of variables available for the workflow model.

Before using the Invoke an AEM Workflow Submit Action configure the following for the AEM DS settings service configuration:

  • Processing Server URL: The Processing Server is the server where the Forms or AEM Workflow is triggered. This can be same as the URL of the AEM author instance or another server.

  • Processing Server User Name: Workflow user’s username

  • Processing Server Password: Workflow user’s password

Submit to SharePoint

The Submit to SharePoint Submit Action connects an Adaptive Form with a Microsoft® SharePoint Storage. You can submit the form data file, attachments, or Document of Record to the connected Microsoft® Sharepoint Storage.

Using Submit to SharePoint, you can:

Connect an Adaptive Form to SharePoint Document Library

To use the Submit to SharePoint Document Library Submit Action in an Adaptive Form:

  1. Create a SharePoint Document Library Configuration: It connects AEM Forms to your Microsoft® Sharepoint Storage.
  2. Use the Submit to SharePoint submit action in an Adaptive Form: It connects your Adaptive Form to configured Microsoft® SharePoint.

Create a SharePoint Document Library configuration

To connect AEM Forms to your Microsoft® Sharepoint Document Library Storage:

  1. Go to your AEM Forms Author instance > Tools > Cloud Services > Microsoft® SharePoint.

  2. Once you select the Microsoft® SharePoint, you are redirected to SharePoint Browser.

  3. Select a Configuration Container. The configuration is stored in the selected Configuration Container.

  4. Click Create > SharePoint Document Library from the drop-down list. The SharePoint configuration wizard appears.

    Sharepoint configuration

  5. Specify the Title, Client ID, Client Secret and OAuth URL. For information on how to retrieve Client ID, Client Secret, Tenant ID for OAuth URL, see Microsoft® Documentation.

    • You can retrieve the Client ID and Client Secret of your app from the Microsoft® Azure portal.
    • In the Microsoft® Azure portal, add the Redirect URI as https://[author-instance]/libs/cq/sharepoint/content/configurations/wizard.html. Replace [author-instance] with the URL of your Author instance.
    • Add the API permissions offline_access and Sites.Manage.All to provide read/write permissions.
    • Use OAuth URL: https://login.microsoftonline.com/tenant-id/oauth2/v2.0/authorize. Replace <tenant-id> with the tenant-id of your app from the Microsoft® Azure portal.
    NOTE
    The client secret field is mandatory or optional depends upon your Azure Active Directory application configuration. If your application is configured to use a client secret, it is mandatory to provide the client secret.
  6. Click Connect. On a successful connection, the Connection Successful message appears.

  7. Now, select SharePoint Site > Document Library > SharePoint Folder, to save the data.

    NOTE
    • By default, forms-ootb-storage-adaptive-forms-submission is present at selected SharePoint Site.
    • Create a folder as forms-ootb-storage-adaptive-forms-submission, if not already present in the Documents library of the selected SharePoint Site by clicking Create Folder.

Now, you can use this SharePoint Sites configuration for the submit action in an Adaptive Form.

Use SharePoint Document Library Configuration in an Adaptive Form

You can use the created SharePoint Document Library configuration in an Adaptive Form, to save data or generated Document of Record in a SharePoint folder. Perform the following steps to use a SharePoint Document Library storage configuration in an Adaptive Form as:

  1. Create an Adaptive Form.

    NOTE
    • Select the same Configuration Container for an Adaptive Form, where you have created your SharePoint Document Library storage.
    • If no Configuration Container is selected, then the global Storage Configuration folders appear in the Submit Action properties window.
  2. Select Submit Action as Submit to SharePoint.
    Sharepoint GIF

  3. Select the Storage Configuration, where you want to save your data.

  4. Click Save to save the Submit settings.

When you submit the form, the data is saved in the specified Microsoft® Sharepoint Document Library Storage.
Folder structure to save data is /folder_name/form_name/year/month/date/submission_id/data.

NOTE
Attachments are also stored in the /folder_name/form_name/year/month/date/submission_id/data directory. However, if you select Save Attachments with Original Name, the attachments are stored in the folder using their original filenames.
image