To get this use case working on your system, please follow the following instructions:
It is assumed that you are running AEM Forms on port 4502.
This sample uses MySQL database to store the adaptive form data. You will need to create the database schema by importing the schema file into MySQL workbench.
You need to create a datasource called StoreAndRetrieveAfData. The code in the OSGi bundle use this datasource name
Form Data Model needs to be created based on this datasource called StoreAndRetrieveAfData. This form data model is used to fetch the mobile phone number associated with the application id. The form data model can be downloaded from here.
Create a developer account with Nexmo for sending and verifying OTP codes. Make a note of the API Key and API Secret Key. The data source and form data model have already been created for you against this service and are included with the assets mentioned in the previous step.
The sample uses 2 client libraries. Import these client libraries into AEM.
The sample forms used in this demo are based on a custom template. Import the custom template into AEM
The 2 forms that make up this sample need to be imported into AEM. The sample forms can be downloaded from here
Open the MyAccountForm in edit mode. Specify the API Key and API Secret values in the appropriate fields in the adaptive form.
Preview the StoreAFWithAttachments
Enter your mobile number including the country code ,fill in your user details and add some attachments. Click the “Save And Exit” button to save the adaptive form and its attachments