Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Customize the form elements in the build form of customizing DAM metadata schema in the Granite UI (touch UI)

Avatar

Level 1

I see there are OOTB form elements such as dropdown, textfield etc.. in the buildform of the customizing DAM metadata schema in the Granite UI.

How do I add more form elements such as Pathfield, multiselectdropdown, multipathfield to this build form so that they can be used to customize the metadata schema. 

1 Accepted Solution

Avatar

Correct answer by
Employee

Its not easily customizable. May be for a reason. If you absolutely must, here is one way. Disclaimer ofcourse is this is just an approach and not the official recommendation.

Overlay /libs/dam/gui/components/admin/schemaforms/formbuilder at /apps/dam/gui/components/admin/schemaforms/formbuilder. Then add your field at /apps/dam/gui/components/admin/schemaforms/formbuilder/formfields/autocompletefield. In autocomplete.jsp ,please remember to add    <input type="hidden" name="./items/<%= key %>/metaType" value="autocomplete"> . Basically a unique metatype. Add that new field to /apps/dam/gui/components/admin/schemaforms/formbuilder/builditems.jsp how it has been done for other fields. Overlay /apps/dam/gui/components/admin/schemaforms/formbuilder/view.jsp and update String formFieldsPath ="dam/gui/components/admin/schemaforms/formbuilder/formfields";. This was originally formFieldsPath ="/libs/dam/gui/components/admin/schemaforms/formbuilder/formfields"; and only seached for fields under this path in libs. Now you should be able to see the new field. I did a sample at https://www.dropbox.com/s/3b6ow6vgx58l192/autocomplete-4.zip?dl=0

View solution in original post

2 Replies

Avatar

Correct answer by
Employee

Its not easily customizable. May be for a reason. If you absolutely must, here is one way. Disclaimer ofcourse is this is just an approach and not the official recommendation.

Overlay /libs/dam/gui/components/admin/schemaforms/formbuilder at /apps/dam/gui/components/admin/schemaforms/formbuilder. Then add your field at /apps/dam/gui/components/admin/schemaforms/formbuilder/formfields/autocompletefield. In autocomplete.jsp ,please remember to add    <input type="hidden" name="./items/<%= key %>/metaType" value="autocomplete"> . Basically a unique metatype. Add that new field to /apps/dam/gui/components/admin/schemaforms/formbuilder/builditems.jsp how it has been done for other fields. Overlay /apps/dam/gui/components/admin/schemaforms/formbuilder/view.jsp and update String formFieldsPath ="dam/gui/components/admin/schemaforms/formbuilder/formfields";. This was originally formFieldsPath ="/libs/dam/gui/components/admin/schemaforms/formbuilder/formfields"; and only seached for fields under this path in libs. Now you should be able to see the new field. I did a sample at https://www.dropbox.com/s/3b6ow6vgx58l192/autocomplete-4.zip?dl=0

Avatar

Level 2

kalyanar wrote...

Its not easily customizable. May be for a reason. If you absolutely must, here is one way. Disclaimer ofcourse is this is just an approach and not the official recommendation.

Overlay /libs/dam/gui/components/admin/schemaforms/formbuilder at /apps/dam/gui/components/admin/schemaforms/formbuilder. Then add your field at /apps/dam/gui/components/admin/schemaforms/formbuilder/formfields/autocompletefield. In autocomplete.jsp ,please remember to add    <input type="hidden" name="./items/<%= key %>/metaType" value="autocomplete"> . Basically a unique metatype. Add that new field to /apps/dam/gui/components/admin/schemaforms/formbuilder/builditems.jsp how it has been done for other fields. Overlay /apps/dam/gui/components/admin/schemaforms/formbuilder/view.jsp and update String formFieldsPath ="dam/gui/components/admin/schemaforms/formbuilder/formfields";. This was originally formFieldsPath ="/libs/dam/gui/components/admin/schemaforms/formbuilder/formfields"; and only seached for fields under this path in libs. Now you should be able to see the new field. I did a sample at https://www.dropbox.com/s/3b6ow6vgx58l192/autocomplete-4.zip?dl=0

 

 

Hello, I did exactly same as explained here But i don't see my component in the build form. Did i miss anything?