How do I modify the taxonomy terms that are listed as a field in my Node edit form?
I need to be able to hide/unpublish/disable my taxonomy terms. Since there is no way to "unpublish" taxonomy terms the way you can unpublish a node, I have created a boolean field in my taxonomy term that holds its status (enabled/disabled).
I would like to use the value of this boolean field to determine whether or not to add a warning text in the taxonomy term name (eg.
Termname [DISABLED]) so that users choosing that taxonomy term are properly warned.
If it matters, I'm currently using the select list widget.
I know I can look up each term in
hook_field_widget_options_select_form_alter since the
tids and term names are available in the
$element, but I hope there is a solution which won't require me to re-load/re-fetch the term from the database again.