Overview

AEM Forms allows you to save a form as a draft. The draft functionality lets you maintain a work-in-progress form, which you can complete and submit later from any device.

By default, AEM Forms stores the user data associated with the draft and submission of a form in the /content/forms/fp node on the Publish instance. In addition, the AEM Forms portal components provide data services, which you can use to customize the implementation of storing user data for drafts and submissions. For example, you can store user data in a data store.

Draft data service

To customize the storage of user data for drafts, you need to implement all the methods of the DraftDataService interface. The following sample code describes the methods and arguments.

Forms portal uses Universally unique identifier (UUID) concept to generate a unique ID for every draft and submitted form. You can also generate a unique ID of your own. You can implement the interface FPKeyGeneratorService, override its methods, and develop a custom logic to generate a custom unique ID for every draft and submitted form. Also, set service rank of custom ID generation implementation higher than 0. It ensures that the custom implementation is used instead of the default implementation.