AEM adaptive forms implementation using REST webservice
Requirement :
Form contains 6 different input fields and submit button. We will invoke rest webservice(JSON request/response) to get dropdown values, checkbox values.
- 1st Field(Name) - Textbox
- 2nd Field(City) - Dropdown(Values fetched from Webservice. Assume values are Bangalore, Chennai, Hyderabad)
- 3rd Field(Interests) - Checkbox(multiple selections and Values fetched from Webservice. Assume values are Swimming, Cycling, Running)
- 4th Field(Gender) - Radiobox(Male or Female)
- 5th Field(Education details) - Table(4 columns - Qualification, Year of passout(dropdown), Percentage, Institution City(dropdown) )
- 6th Field(Education documents) - Attachment(multiple attachments)
For adding the details in table, User has to click addtabledata button which display the below popup.
Add Table data popup(contains 2 textboxes,2 dropdowns and add button). After user enter/select data in this popup and click add button, user entered data will be displayed in the table.
Once the form is submitted, all the data(including attachments) will be stored in third party system via rest webservice. Approver can either reject or approve the submitted form.
User should be allowed to edit the form again if the form is rejected state.
User should be able to access the form(readonly mode) if the form is submitted or approved state
Functionality 1 :
User enter/select the following values in below input fields and submit the form.
Arun
Bangalore
Swimming and Running
Male
B.E | 2009 | 98 | Bangalore
Degree certificate, Provisional certificate
Functionality 2 :
If the form is in SUBMITTED state, User should access the same form which should display all the user entered information(including attachments) in readonly mode(all fields should be auto filled using rest webservice).
Functionality 3 :
If the form is in REJECTED state, User should access the same form which should display all the user entered information in edit mode.
All the input fields(including attachments) should be auto filled using rest webservice.
User can change the dropdown/checkbox/radiobox value or update/remove table data/attachment and submit the form again.
Modifed value :
Madan
Chennai
Cycling and Running
Male
B.E | 2010 | 97 | Chennai
Degree certificate
Query:
1) Is this implementation possible in AEM adaptive forms using JSON schema ? Is there any other way to implement this three functionalities in AEM forms?
As of now, I completed functionality-1 using Basic adaptive form without JSON schema(form data model as NONE). Calling webservice from rule editor and displayed the data for dropdown/checkbox fields.
I read the below links to implement the functionality-3
https://docs.adobe.com/content/help/en/experience-manager-64/forms/adaptive-forms-advanced-authoring/prepopulate-adaptive-form-fields.html#json-schema-based-adaptive-forms(Approach mentioned in this link is not related to rest webservice)
https://helpx.adobe.com/in/experience-manager/6-4/forms/using/configure-data-sources.html(Looks like this approach work only in Adobe cloud platform). We are not using Adobe cloud platform