Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Fetch Data from CRX and display it on Adaptive Form

Avatar

Level 3

Hello Everyone,

In our application; we submit the Adaptive Form data to CRX via. Submit button. Now, I need to fetch the same data from CRX and show it on a different adaptive form. Could any one please highlight the steps for fetching the data from CRX and display it on forms?

Thanks
TanmaySingh

1 Accepted Solution

Avatar

Correct answer by
Level 3

Filling from CRX is relatively easy using the dataRef parameter:

http://localhost:4502/content/forms/af/xml.html?wcmmode=disabled&dataRef=crx:///tmp/fd/af/myassets/sample.xml

You need to make sure your crx payload data matches the schema / mappings of your adaptive form though.

Adobe Experience Manager Help | Prefill adaptive form fields

View solution in original post

3 Replies

Avatar

Administrator

I am not an expert in AEM forms, but you can configure the submit action to store the data.

Example:- Adobe Experience Manager Help | Writing custom Submit action for adaptive forms

And if the question is to use the data to pre fill the form, then by default, prefill is allowed through crx files for all types of Adaptive Forms (XSD, XDP, JSON, and no Form Model based). Prefill is allowed only with JSON and XML files. Adobe Experience Manager Help | Prefill adaptive form fields

And if you want to render the data present in JCR, then you can write a custom service like Adobe Experience Manager Help | Querying Adobe Experience Manager Data using the JCR API or Adobe Experience Manager Help | Using Sling APIs to retrieve content from the Adobe Experience Manag...

Reference Good Read:-

Adobe Experience Manager Help | Posting Adobe Experience Manager Form Data to Custom Services

Adobe Experience Manager Help | Submitting Adobe Experience Manager form data to Java Sling Servlets



Kautuk Sahni

Avatar

Level 3

Thank you for your response. We are good with configuring the custom submit functionality and it's working absolutely fine.

I am only experience issue on fetching the data from CRX and then posting it to the form.

Thanks

TanmaySingh

Avatar

Correct answer by
Level 3

Filling from CRX is relatively easy using the dataRef parameter:

http://localhost:4502/content/forms/af/xml.html?wcmmode=disabled&dataRef=crx:///tmp/fd/af/myassets/sample.xml

You need to make sure your crx payload data matches the schema / mappings of your adaptive form though.

Adobe Experience Manager Help | Prefill adaptive form fields