HTML formatting not working in custom display component (AEM Forms)

RonakB 07-10-2016

We are reverse replicating user generated data submitted via AEM Forms to author instance and then triggering a workflow via launcher which will send this form data for some approval to a user group. When it comes to the user's /notifications, it displays link of the payload (sling:Folder in our case). 

Clicking on the payload displays the user submitted data in xml format. We wanted this data to be in a more presentable way. So we wrote one custom component which will read all the user generated data from sling:Folder and display. For this we set resource:Type property for the form instance to our custom display component.  (/apps/mysite/customdisplay). customdisplay component has GET.html as the rendering script. I am using GET.html because clicking on payload from /notifications takes user to http://localhost:4502/content/usergenerated/content/forms/af/registration/1475757864707_1 (without any extension)

The problem is when I am using html tags inside my GET.html, it is displayed as plain text and not as HTML elements when user clicks on payload. It means browser is not interpreting this as HTML document OR I am missing something here. 

Note: Adding .html at the end of payload, tries to download this page as HTML page. Is it because this is sling:Folder ?

Any other suggestion to change the default view of UGC payload in author ?

#AEMForms, #UGC

Mark Solution

Are these answers useful?
Help other community members by marking useful answers as accepted.

Accepted Solutions (0)

Answers (2)

Answers (2)

smacdonald2008 07-10-2016

You want to get submitted data from Pub to Auth correct? 

I would look at writing a service that gets the submitted data and writes the form data to the JCR as node props. Then replicate those nodes. This way, you are not dealing with HTML, XML, etc. Data is stored as nodes and props taking advantage of the JCR.  Once reverse replicated, you can process the data to meet your business requirements.