Justis R
Member
- Affected version
- v2.2.7 Patch 1
The tokeninputrow href expects a response mapping an id to a display text for a provided query, when the tokeninputrow is submitted, the id is what's submitted, not the display text, which is ideal. However, the tokeninputrow only accepts a comma separated list of strings as the value, and those strings are used as both the id and display text for the filled in values, meaning that the id and display text must be the same, if you're filling in existing values.
This is a particularly severe limitation for tokens which could have a comma in their name.
For instance, resources. The tokeninputrow is the best input type to use for resources given that it is scalable to any number of resources that a user may have. A user can type in the name of their resource and find it without having to scroll through potentially hundreds of resource titles in a fully rendered checkbox/select row looking for it. However, resource titles could have commas in them, so the resource id is absolutely necessary as the token id. Which means that the tokeninputrow is effectively unusable for resources in an edit form, unless you want users seeing raw resource ids in place of their previously entered values.
Suggestion:
Accept an array as an alternative value type, and use the keys as the id and the value as the text
This is a particularly severe limitation for tokens which could have a comma in their name.
For instance, resources. The tokeninputrow is the best input type to use for resources given that it is scalable to any number of resources that a user may have. A user can type in the name of their resource and find it without having to scroll through potentially hundreds of resource titles in a fully rendered checkbox/select row looking for it. However, resource titles could have commas in them, so the resource id is absolutely necessary as the token id. Which means that the tokeninputrow is effectively unusable for resources in an edit form, unless you want users seeing raw resource ids in place of their previously entered values.
Suggestion:
Accept an array as an alternative value type, and use the keys as the id and the value as the text
Last edited: