Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

How to bind XML data in Adaptive Form Page?

Avatar

Level 1

Hi All,

 

The Form are created using AEM Adaptive Form and applied the bind reference with xml schema. The requirement is, have to create a OSGI REST service that should accept form name & xml data with reference to field binding and should return the Adaptive Form page URL with xml data binding. 

Could you please suggest how to bind the xml data to Adaptive Form page and return in service?

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 3

@ramachandra_pokala - In your Submit section you can have pass XML to the workflow (REST) & you can read the same XML data in workflow.

View solution in original post

5 Replies

Avatar

Correct answer by
Level 3

@ramachandra_pokala - In your Submit section you can have pass XML to the workflow (REST) & you can read the same XML data in workflow.

Avatar

Employee Advisor

@ramachandra_pokala  You can go to form properties and bind the form the xsd. To get data from the form and send it to a service, call the below method and send the received response to your service. 

https://helpx.adobe.com/experience-manager/6-3/forms/javascript-api/GuideBridge.html 

 

guideBridge.getData({
    success : function (guideResultObject) {
         console.log("data received" + guideResultObject.data);
    }
    error : function (guideResultObject) {
         console.error("API Failed");
         var msg = guideResultObject.getNextMessage();
         while (msg != null) {
             console.error(msg.message);
             msg = guideResultObject.getNextMessage();
         }
    }
});

- Mayank Gandhi

Hi @Mayank_Gandhi, thank you for the reply. the requirement is: Client application will send the form data in XML file with Form Name, the service has to bind the XML data into Adaptive Form and return the form URL to Client application.

Avatar

Employee Advisor

@ramachandra_pokala That's exactly what XSD will help you with. Take a dummy data and convert to xsd(bunch of free tools available). Bind form with XSD and as the data will come it will be filled based on binding. Or use form data model, it supports both soap and REST.

 

https://experienceleague.adobe.com/docs/experience-manager-learn/forms/adaptive-forms/prefill-servic....