Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

touchUI metadata schema editor

DhirajAg
Level 4
Level 4

Hi,

I want to add a custom field in touchUI metadata schema editor. How can i do it? I was looking at /libs/dam/gui/coral/components/admin/schemaforms/formbuilder/formfields and though this is the place where I can add or modify something. I tried to modify the tagsfield/tagsfield.jsp file but changes do not reflect in metadata schema editor.

My specific requirement is to make the tagspicker a required field. Required attribute is by default available for text fields but not for tags. I know we can overlay the tagspicker.js file but I dont want tags to be mandatory at other places. I want it to be mandatory only in metadata schema editor.

5 Replies
DhirajAg
Level 4
Level 4

Hi Scott,

Yes i am referring to the same link you shared. I have added screenshot of text field and tags field where required checkbox is not present.

Lokesh_Shivalingaiah
Community Advisor
Community Advisor

Hi Dhiraj,

Here is the file where you can add the same

'/libs/dam/gui/coral/components/admin/schemaforms/formbuilder/formfields/tagsfield/tagsfield.jsp'

change line #54 to

String[] settingsList = {"labelfields", "metadatamappertextfield", "requiredfields", "disableineditmodefields", "showemptyfieldinreadonly", "titlefields"};

Now you should be able to see the checkbox (Refer the attachment). I didnt test if the validation really works or not. If it doesnt work, you can dig it little further else let me know.

smacdonald2008
Level 10
Level 10

TO add items to the form builder, you need to overlay this: 

/libs/dam/gui/components/admin/schemaforms/formbuilder/builditems.jsp

Then you can add your own components under /apps using /libs/dam/gui/components/admin/schemaforms/formbuilder/formfields/tagsfield as a guide.

HTH

DhirajAg
Level 4
Level 4

Thanks Lokesh and Scott !

I was able to add the required checkbox by modifying line #54 as mentioned above. However the validation doesn't work. It still allows me to save metadata with blank value in tags. I tried but couldnt find the place to check for validation.