Expand my Community achievements bar.

SOLVED

How to set custom profile as default for HTML5 forms

Avatar

Level 1

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:

 

Screenshot 2022-03-09 at 14.09.07.png

 

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.

1 Accepted Solution

Avatar

Correct answer by
Employee

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:

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/how-to-add-update-properti...

For this, you need to use setProperty method to do the same.

 

Hope this helps.

 

 

 

View solution in original post

1 Reply

Avatar

Correct answer by
Employee

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:

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/how-to-add-update-properti...

For this, you need to use setProperty method to do the same.

 

Hope this helps.