Format item value?

25 views
Skip to first unread message

Chad Files

unread,
Dec 6, 2012, 7:48:01 AM12/6/12
to django-s...@googlegroups.com
In my forms I have implemented the JavaScript formatLabel and it works great. That said, I would like to do the same with the value. I did not see in the documentation where that could be done, is it possible? If so, how can I go about it?

This is really more for multiselect items than a simple combobox. 

Mark Lavin

unread,
Dec 6, 2012, 9:01:18 AM12/6/12
to django-s...@googlegroups.com
No there isn't currently a hook for formatting the item value on the client side thought it probably wouldn't be too difficult add one. In the meantime I think what you are trying to do can be accomplished by catching the `djselectableadd` add event and modifying the <li> element in the handler: https://django-selectable.readthedocs.org/en/version-0.6.2/advanced.html#detecting-client-side-changes

Best,

Mark
Reply all
Reply to author
Forward
0 new messages