Hello,
I am trying to implement a functionality on our HTML5 forms, where i provide a Import button through the profile (jsp).
This Import would look for a partially prefilled PDF, once imported, it should prefill the opened HTML5 form.
In case prefilling an already opened HTML5 form is not an option, i am still fine to reload the HTML5 form with data prefilled.
So far, i have tried, importing the PDF, the extracted XML structure from PDF is not complete, its missing some tags or probably when AEM converts an XDP to HTML5, the element names are different from XDP field names (?). But overall thats what i am trying, any better approaches or thoughts will be really helpful.
Thanks again,
Abhishek
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Hi @kolluax,
You’re right, the issue usually comes from mismatched field bindings between the XDP (PDF) and the rendered HTML5 form. When AEM converts XDP to HTML5, some field names change or get dropped, which causes missing tags in the extracted XML.
You can try:
Using a common XML schema or Form Data Model (FDM) so both PDF and HTML5 share the same structure.
Calling guideBridge.setData(xmlString, true) to load the imported XML into the open form. This works even if the form is already loaded.
If that still doesn’t map correctly, reload the form with ?dataRef= pointing to your uploaded XML file.
If this doesn’t help, please post your specific form details or snippets here:
https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/ct-p/adobe-experience-mana...
Someone can then look at your bindings and help pinpoint what’s missing.
Hi @kolluax,
You’re right, the issue usually comes from mismatched field bindings between the XDP (PDF) and the rendered HTML5 form. When AEM converts XDP to HTML5, some field names change or get dropped, which causes missing tags in the extracted XML.
You can try:
Using a common XML schema or Form Data Model (FDM) so both PDF and HTML5 share the same structure.
Calling guideBridge.setData(xmlString, true) to load the imported XML into the open form. This works even if the form is already loaded.
If that still doesn’t map correctly, reload the form with ?dataRef= pointing to your uploaded XML file.
If this doesn’t help, please post your specific form details or snippets here:
https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/ct-p/adobe-experience-mana...
Someone can then look at your bindings and help pinpoint what’s missing.
Thanks @SantoshSai .
I have used same JSON schema for the template and the imported PDF. I changed my logic to make sure of Forms Service Integration libraries to export the XML from the imported PDF and then used formbridge api to import them into the HTML behind screens i was saving the XML at a temporarily location until the prefill is done and then deleting it.
This worked for me though it took some time for initial render after importing. I verified that Form Bridge initialization takes a while after the form renders so i had to add retries in the logic.
Thanks again for the feedback and suggestions.
Views
Likes
Replies