We are using the AEM HTML5 forms feature to present a large number of legacy XDP forms to users on the web. These forms have common functionality which is implemented using a Custom HTML Render Profile.
When we upload a form XDP, we have to individually change the HTML Render Profile from the default, to our custom profile in order to enable our custom features. This is done by going to the uploaded XDP properties in AEM, selecting the Advanced tab and choosing our profile from the HTML Render Profile dropdown:
This is time consuming and error prone (we have several hundred forms), so I was wondering if its possible to change the default profile at folder level, or somehow otherwise programatically ensure all forms are using the custom, rather than the default profile.
Solved! Go to Solution.
Views
Replies
Total Likes
For every XDP you upload in AEM Forms, the rendering profile property is stored at /content/dam/formsanddocuments/<xdp_name>.xdp/jcr:content/metadata node.
You can either use curl command to update the property with the command below:
https://sourcedcode.com/blog/aem/update-a-node-jcr-property-in-aem-with-curl
curl -v -u admin:admin -X POST http://localhost:4502/content/dam/formsanddocuments/<xdp_name>.xdp/jcr:content/metadata --data-urlencode 'profile=<customProfileName>'
Or you may use a java code to do the same recursively for all the XDPs dynamically, as discussed here:
For this, you need to use setProperty method to do the same.
Hope this helps.
For every XDP you upload in AEM Forms, the rendering profile property is stored at /content/dam/formsanddocuments/<xdp_name>.xdp/jcr:content/metadata node.
You can either use curl command to update the property with the command below:
https://sourcedcode.com/blog/aem/update-a-node-jcr-property-in-aem-with-curl
curl -v -u admin:admin -X POST http://localhost:4502/content/dam/formsanddocuments/<xdp_name>.xdp/jcr:content/metadata --data-urlencode 'profile=<customProfileName>'
Or you may use a java code to do the same recursively for all the XDPs dynamically, as discussed here:
For this, you need to use setProperty method to do the same.
Hope this helps.