Hi all,
I need to disable the manual entry of the tags in tagfield in assert property, for example when typing the tag name in the tag field it should populate the suggested tags in the dropdown list so either i need to select from the list or else i need to select the tags using the browse icon in the tagfield, when typing the tag name in the tag field and clicking enter it should not add the tag in the field, so how can we prevent this functionality any one can give some suggestion on this please.
Thanks
Nandheswara
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @Nandheswara
You may need to create a custom metadata schema to add following property to tag field
/**
* Indicates if the user must only select from the list of given options.
* If it is not forced, the user can enter arbitrary value.
*/
- forceSelection (Boolean)
/**
* When ``forceSelection = false``, ``true`` to create the user defined tag during form submission; ``false`` otherwise.
*/
- autocreateTag (Boolean)
/libs/cq/gui/components/coral/common/form/tagfield/render.jsp
Hi @Nandheswara
You may need to create a custom metadata schema to add following property to tag field
/**
* Indicates if the user must only select from the list of given options.
* If it is not forced, the user can enter arbitrary value.
*/
- forceSelection (Boolean)
/**
* When ``forceSelection = false``, ``true`` to create the user defined tag during form submission; ``false`` otherwise.
*/
- autocreateTag (Boolean)
/libs/cq/gui/components/coral/common/form/tagfield/render.jsp
Hi @Nandheswara ,
Just wondering why are you trying to prevent the enter key on a tagfield? When you try to add a bad value which is not resolved as tag, you should not be able to save the dialog. I tried on a Page Property and get the error while saving it-
@Nandheswara , Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Likes
Replies
Views
Likes
Replies