Hi Everyone,
I have created a Adaptive form in AEM. I want to retrieve JSON from an adaptive form and render it in a React application. I'm not able to retrieve the adaptable form's JSON in headless approach
I adhered to the guidelines provided in this article: https://experienceleague.adobe.com/en/docs/experience-manager-headless-adaptive-forms/using/get-star.... I still can't seem to find the form model.json with form data as mentioned in the article. Could you please tell me how to go about achieving this?
@arunpatidar @EstebanBustamante @aanchal-sikka
Durga Kavali
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Durga,
It seems you are using a foundation adaptive form. Headless is supported by core component based adaptive form only.
Thanks,
Pankaj Parashar
Hi Durga,
You can achieve your use case using any of the following two approaches.
Approach #1 - Update .env file
Approach #2 - Download form model json for remote form and update local form-model.json
After following any of the approach, execute npm start command and verify the result.
I hope this information answers your query.
Pankaj Parashar
Hi @pankajpr
I'm grateful for your reply.
I've already tried the ways described above. Please see if there are any missing parts.
/content/forms/af/test9/jcr:content/guideContainer.model.json
Regards,
Durga Kavali.
Hi Durga,
It seems you are using a foundation adaptive form. Headless is supported by core component based adaptive form only.
Thanks,
Pankaj Parashar
Thank you @pankajpr for prompt response.
Yes, I have used an adapted form built on the foundation. This is how I obtain the model.json when I create a form using the core components.
{ "method": "POST", "enctype": "multipart/form-data", "id": "new_form", "name": "new_form", "action": "/content/forms/af/test10.html", "resourceTypeForDropArea": "aemutilitykit/components/form/container/new", ":itemsOrder": [ "text" ], ":items": { "text": { "id": "form-text-307749072", "title": "Text input field", "name": "text", "value": "", "helpMessage": "", "type": "text", "readOnly": false, "required": false, "requiredMessage": "", "constraintMessage": "", "rows": 2, "defaultValue": "", ":type": "aemutilitykit/components/form/text" } }, ":type": "aemutilitykit/components/form/container" }
regards,
Durga Kavali.
Did you create adaptive form based on core components?
Views
Likes
Replies