Injecting externally managed content into AEM HTML5 (XDP) Form | Community
Skip to main content
December 6, 2021

Injecting externally managed content into AEM HTML5 (XDP) Form

  • December 6, 2021
  • 1 reply
  • 970 views

We are using the AEM Forms HTML5 capability to put a large number of XDP based forms online. Some of the forms contain common bits of text content (like an official brand name, contact email address or phone number) which we want to centrally manage so changes can be updated for all forms in one go. 

 

I had a look around, and saw that data from external sources can be passed into the form using data or dataRef parameters, but this seems very much focussed on binding the data to fields, rather than plain content. Whats the best way to bind external data to content in the form?

 

I have seen this done in pure XDP forms using span elements with xfa:embed 'binding' to floating fields, but this doesn't seem to work in HTML5 forms (perhaps its not supported).

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Mayank_Tiwari
Adobe Employee
Adobe Employee
December 7, 2021

For HTML Forms, you can inject the data using data and dataRef attributes only, as explained here.

 

wipr1Author
December 7, 2021

Thanks @mayank_tiwari - I understand this is the way to get the content into the form data model, but how can I render this content? Am I limited to binding it to a specific field element, or are there other ways to render this? Can I for example bind it to a hidden or floating field, and then refer to this field value within a block of content (similar to the xfa:embed approach mentioned in my question)

Mayank_Tiwari
Adobe Employee
Adobe Employee
December 7, 2021

I would suggest you to use Adaptive Forms(instead of HTML5 forms) using the same XDP template, , as adaptive forms offers Form data model, using which you can easily achieve this use case.