Closed thegitterhub closed 3 years ago
@thegitterhub There is a feature already exist for the Tags field for you to create a new tag if it is not part of the JSON. I never got a chance to add UI for this feature in the configurator form. However, You can manually manipulate the JSON.
If you open view template JSON and add allowCreate: true
this will allow you to create a new tag by typing in the box and hit enter
This should work for Multiple DropDown and Tags fields.
I will add this to the UI for the next release.
Here is an example:
{
"id": "11",
"displayName": "Breed",
"namespace": "http://pet.adobe.com",
"prefix": "pet",
"propertyName": "breed",
"type": "Tags",
"options": [{
"label": "Labrador Retriever",
"parent": "Dog",
"value": "Labrador Retriever"
}, {
"label": "German Shepherd Dog",
"parent": "Dog",
"value": "German Shepherd Dog"
}, {
"label": "Golden Retriever",
"parent": "Dog",
"value": "Golden Retriever"
}, {
"label": "Bulldog",
"parent": "Dog",
"value": "Bulldog"
}, {
"label": "Siamese",
"parent": "Cat",
"value": "Siamese"
}, {
"label": "Ragdoll",
"parent": "Cat",
"value": "Ragdoll"
}, {
"label": "British Shorthair",
"parent": "Cat",
"value": "British Shorthair"
}, {
"label": "Persian",
"parent": "Cat",
"value": "Persian"
}, {
"label": "Maine Coon",
"parent": "Cat",
"value": "Maine Coon"
}, {
"label": "Parrot",
"parent": "Bird",
"value": "Parrot"
}, {
"label": "Chicadee",
"parent": "Bird",
"value": "Chicadee"
}, {
"label": "Cockatoo",
"parent": "Bird",
"value": "Cockatoo"
}, {
"label": "American Rabbit",
"parent": "Rabbit",
"value": "American Rabbit"
}, {
"label": "English Lop",
"parent": "Rabbit",
"value": "English Lop"
}, {
"label": "Blanc de Hotot",
"parent": "Rabbit",
"value": "Blanc de Hotot"
}, {
"label": "Other",
"parent": ["Cat", "Dog", "Bird", "Rabbit", "Others"],
"value": "Other"
}],
"arrayType": "bag",
"allowCreate": true
}
@bhunut-adobe Thanks I was able to get this working by adding "allowCreate": true manually as you described. Look forward to it in the UI.
This is incorporated into the UI for the next release.
When using the "Tags" field type, we can populate our keyword taxonomy into the Options tab via JSON. When the user fills out metadata they are forced to use the taxonomy suggestions only. They cannot add their own user values.
In contrast, when using the "Multiple Text" field type, our users can add their own keywords without being forced into the taxonomy. However, with "Multiple Text", we cannot leverage our taxonomy to make suggestions to the user.
Requesting a hybrid functionality where the user is prompted with suggestions from the taxonomy (from the Options tab)...but can also add their own values if there are no relevant values from the suggestions.
The use case is basically:
It seems it’s either all taxonomy based or none at all.
Workarounds Tried To try and solve, I added a second keyword field to the panel…(one field set to Tags and one set to MultiText). While each of these work individually, you can’t use them in the same session, the panel favors the one set to a Tags field type to write/embed to dc:subject. The MultiText keyword is not embedded in this scenario even though it displays “Metadata Updated” in green.
Possible Way to Implement: Add a yes/no choice in the "Edit a metadata form field" dialog to allow or disallow user generated values when using the "Tags" field type along with a taxonomy in the Options tab. Choosing No will keep the current behavior as it is now. Choosing yes will allow the user to add their own values, while still being prompted with suggestions from the taxonomy. (see image below)