Expand my Community achievements bar.

touchUI metadata schema editor

Avatar

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

Avatar

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.

Avatar

Level 10

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.

Avatar

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

Avatar

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.