Hi,
Is there a way to restrict the users from having hand-typed values for the field with tagfield resourceType?
As shown below in the screenshot, the value for the Tags field has two values. "Typed" is the value being hand-typed whereas "Asset Properties: Orientation / Landscape" is the value being selected from the tags screen after clicking the check mark button.
In the below screenshot, I would like to restrict "Typed" value and allow the selected "Asset Properties: Orientation / Landscape" value.
-Anish
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @anish11,
In general you can't do this from GUI. However this can be done other way.
First of all Tags filed is using cq/gui/components/coral/common/form/tagfield, which provides below property, that could be useful in your case.
How you can utilize above in your scenario. Assuming you are using OOTB asset schema but it will be similar if you have custom one), you will needed to edit default schema and save it, no changes are required. As a result under /conf proper definition representing default schema will be created. To be more precise you will find it under /conf/global/settings/dam/adminui-extension/metadataschema/default, next you have to look for node that represents Tags input and add forceSelection property with value true.
That's all, from now user will be able only to select tags, and even if he/she will type value it will not be saved as a tag.
You can only control the rootpath to allow selection inside certain paths using rootpath property using docs https://developer.adobe.com/experience-manager/reference-materials/6-5/granite-ui/api/jcr_root/libs/... if your use case is to only allow one as default you can use metadata profile available for asset metadata https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/assets/manage/metad...
Hi @anish11,
In general you can't do this from GUI. However this can be done other way.
First of all Tags filed is using cq/gui/components/coral/common/form/tagfield, which provides below property, that could be useful in your case.
How you can utilize above in your scenario. Assuming you are using OOTB asset schema but it will be similar if you have custom one), you will needed to edit default schema and save it, no changes are required. As a result under /conf proper definition representing default schema will be created. To be more precise you will find it under /conf/global/settings/dam/adminui-extension/metadataschema/default, next you have to look for node that represents Tags input and add forceSelection property with value true.
That's all, from now user will be able only to select tags, and even if he/she will type value it will not be saved as a tag.
Thanks @lukasz-m. This exactly solved my use case.
Also do you mind sharing the link for the online documentation on the tagfield that you have mentioned under /libs/cq/gui/components/coral/common/form/tagfield/render.jsp please?
Views
Likes
Replies