Storing and Retrieving Adaptive Form Data with 2FA

This tutorial will walk you through the steps involved in saving and retrieving Adaptive Form Data with attachments using 2FA. This tutorial used MySQL database to store Adaptive Form data. Database of your choice can be used to store the data as long as you have deployed the database specific drivers in AEM. At a high-level, the following steps are needed to achieve the use case:

  • Use the GuideBridge API get access to the Adaptive Form data

  • Make a POST call to a servlet. This servlet stores the data in the database and the form attachments in the CRX repository. The stored data in the database is associated with a GUID.

  • When you want to populate the Adaptive Form with the stored data, you retrieve the data associated with the GUID and populate the Adaptive Form using the request.setAttribute method.

Demonstration of the use case

Hi, in this video, we will take a look at the use case of saving and retrieving an adaptive form with attachments using two-factor authentication. So, what you see on the screen is a fairly basic adaptive form which allows me to enter my mobile number and some of my contact details here.
And it also allows me to add some attachments. So, for example, I’m going to add my California driver’s license attachment here, and I’m also able to add bank statement here. So, I can add a bank statement for the month of September. Now, if I want to save and exit and come back to continue filling the form at a later stage, I can click on this button. The form gets stored in the database and I’m presented with a unique identification number that can be used to retrieve this application at a later time. So, I click on this Okay and I’m presented a screen which allows me to fetch my application. So here I’m going to enter the unique ID and fetch my application. I have, then I need to confirm my telephone number for two-factor authentication. So here I will click on confirm telephone number. So now I need to confirm my telephone number with the OTP code that was sent to me. And that code is 0331. And when I confirm the OTP code, my partially completed application will be presented to me. So, this is my application which has the data that was filled in earlier. And it also has the attachments. So, in this course, we will take a look at behind the scenes steps that were needed to accomplish this particular use case. -


The audience of this content is expected to have some experience in the following areas:

  • Adaptive Form
  • Form Data Model
  • OSGi services/components
  • AEM Client Libraries

Next Steps

Configuring Data Source