Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Fetch Data from CRX and display it on Adaptive Form

Tanmay137
Level 3
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
lesutton1
Correct answer by
Level 3
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
kautuk_sahni
Community Manager
Community Manager

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

Tanmay137
Level 3
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

lesutton1
Correct answer by
Level 3
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