Create a custom tag field, with params as per the documentation.
Here's mine:
<field name="tag" mode="ajax" multiple="false" custom="allow" type="tag" label="My Custom Tag" description="Description of My Custom Tag" hint="Hint of My Custom Tag"/>
Admin user can select existing tag, or create a new tag.
Admin user can only select an existing tag, there is no option to enter a new tag. If set to multiple="true"
then the user can type in the field, which appears to only be doing a search for a matching tag, but of course this is a new tag, so nothing is returned and alas, nothing is saved.
Joomla 3.9.8.
As per the document linked above, I would expect an admin user to be able to create a new custom tag, but this appears not to be the case. Also same issue mentioned in #28298.
Labels |
Added:
?
|
@ReLater Correct; the tag field has been added into a custom component form XML, just as described in the docs. The tag field appears as an option list, therefore I can select existing tags, save, and the tag selected is saved as expected, but the issue is I cannot create a new tag from here, which the documentation clearly states I should be able to as per here under "Ajax Mode".
the tag field has been added into a custom component form XML
And you followed all the other steps, i.e. table fields mapping, new content types in database and so on?
closing as we have a pr
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-05-13 17:01:56 |
Closed_By | ⇒ | alikon |
Status | Closed | ⇒ | New |
Closed_Date | 2020-05-13 17:01:56 | ⇒ | |
Closed_By | alikon | ⇒ |
Another update to this one. It appears custom fields do get added to the field and do get saved if the user physically hits the Enter key. Clicking outside of the tag field does not retain the custom tag, hence it is not saved. Same behaviour experienced on J 3.6.5 and 3.9.8.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-11-06 19:47:53 |
Closed_By | ⇒ | Hackwar | |
Labels |
Added:
No Code Attached Yet
Removed: ? |
I can understand that the behavior is not 100% intuitive, however this is intended behavior, mainly because a tag can consist out of more than one word. Without confirming by hitting the enter key, we wouldn't know if a string with x words is one single tag or x separate ones. So I'm closing this one as expected behavior.
Do I understand correctly?
You have created a custom component and then you integrated the tag features for one or more views like described in the docs.
Then you cannot create a new tag in one of the edit views of this custom component?
Or is your expectation to create a new tag somewhere? See #29015 (comment)