You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This makes it hard to implement a new custom field for which the stored value and display value should be different. Say, a lookup field that stores the uuid of another content object but displays for example its Title.
This seems to me to require that we for example:
design a format for specifying (key, displayvalue) vocabularies; say, separate key & display value by pipe ('|') character (or something else)?
for backwards compatibility, have the vocabulary method return (vocabulary) value + pipe char + value if the vocabulary item does not contain a pipe char
change the view & edit templates to handle both key & display value
It would be perhaps better if (key, displayvalue) tuples were used rather than keeping to a (pipe-separated) string. But that requires additional changes to validator and catalog code and perhaps somewhere else so I'd prefer the simpler option suggested here.
I need this, so would be happy to implement (have a monkeypatched proto working). But I wonder if I have missed something here...?
The text was updated successfully, but these errors were encountered:
petri
changed the title
have select field store both key and display value
have select field support both key and display value
Oct 7, 2015
For select field, the table cell value is used to fill both the select option element value attribute and the option tag content itself. As in:
This makes it hard to implement a new custom field for which the stored value and display value should be different. Say, a lookup field that stores the uuid of another content object but displays for example its Title.
This seems to me to require that we for example:
It would be perhaps better if (key, displayvalue) tuples were used rather than keeping to a (pipe-separated) string. But that requires additional changes to validator and catalog code and perhaps somewhere else so I'd prefer the simpler option suggested here.
I need this, so would be happy to implement (have a monkeypatched proto working). But I wonder if I have missed something here...?
The text was updated successfully, but these errors were encountered: