The Drafts & Submissions component lists all the forms that are in the draft state and the forms that are already submitted. The component has separate sections (tabs) for drafts and submitted forms. The users can view only their drafts and submitted forms.
The Drafts & Submissions component has two tabs: Drafts and Submissions.
To enable submission of an adaptive form to appear in the submissions tab, set the Submit action to Forms Portal Submit Action. Alternatively, enable the Forms Portal Submit option. Whenever, a user submits the form, the form is added to the submissions tab.
The drafts functionality is enabled out of the box. When a user clicks Save on an adaptive form, the form is added to the drafts tab.
Perform the following steps to add and configure a Drafts & Submissions component:
Drag-and-drop the Drafts & Submissions component under Document Services category in the components browser on to your page.
Tap the component and then tap to open the Edit dialog for the component.
In the Edit dialog, specify the following details and tap Done to save the settings.
|General||Total Result||Specifies the maximum number of results to display. If the count of results increases the Total Result limit, a More link appears at the bottom of the component. Clicking More shows all the forms.|
|Style Type||Specifies the style of the component. You can specify No Style, Default Style, or Custom Style for listing the forms. For Custom Style Option, you can specify the path of custom CSS file in the Custom Style Path field.|
|Custom Style Path||If you choose Custom Style option in the Style Type field, use the Custom Style Path field to specify the path of custom CSS file.|
Specifies the tabs to display. You can choose to display draft forms, submitted forms, or both.
Note: For Display options, if you select an option other than Both, the Default Tab field option is not used.
|Default Tab||Specifies the tab to display when the forms portal page loads. You can choose between Draft Forms Tab and Submitted Forms Tab.|
|Draft Forms Tab Configuration||Custom Title||Specifies title of the Draft Forms tab. The default value is Draft Forms.|
|Layout Template||Specifies the layout to use for Draft Forms list.|
|Submitted Forms Tab Configuration||Custom Title||Specifies title of the Submitted Forms tab. The default value is Submitted Forms.|
|Layout Template||Specifies the layout to use for Submitted Forms list.|
When you use the Forms Portal submit action or enable the Store data in forms portal option in adaptive form, the form data is stored in AEM repository. In a production environment, it is recommended not to store draft or submitted form data in AEM repository. Instead, you must integrate the drafts and submission component with a secure storage like enterprise database to store drafts and submitted forms data.
Forms portal allows you to store data at local AEM repository, remote AEM repository, or to a database. AEM Forms allows you to customize the implementation of storing user data for drafts and submissions. You can override default methods to specify how draft and submissions data is stored at a storage of your choice. For example, you can store the data in a data store currently implemented in your organization.
Forms portal provides out of the box services (APIs) to store data on crx-repository of local and remote AEM Forms publish instances. You can replace the default implementations, described in Configuring storage services for drafts and submissions article, with custom implementations to replace default functionality. For detailed information about the methods required in a custom implementation to store content at a secured location, see Customizing Draft and Submission data services and Custom storage for drafts and submissions component.
AEM Forms documentation provides a Sample for integrating drafts & submissions component with database. You can use the sample implementation to develop your own custom implementation.