I have added a Boolean authorized
field to my I8 taxonomy terms via a lyrasis_module_entity_base_field_info
function in my custom module. Currently the default value of this field is FALSE.
Many (but not all) of my vocabularies also have a URI external_vocabulary_uri
field.
What I would like to be able to do is:
-
if there is an
external_vocabulary_uri
field on my taxonomy term AND if there is a value in that field, the value ofauthorized
field gets set to TRUE automatically -
otherwise, value of
authorized
field remains FALSE unless a user sets it to TRUE. If this field value gets set to TRUE, it does not ever get "automagically" set back to FALSE, but may be changed back to FALSE manually by a user, or by explicit batch change, etc.
Note:
-
When a new term form is opened, there is no
external_vocabulary_uri
value. It will be entered by the user. So it seems like something needs to happen to change the value ofauthorized
on form save? -
If existing term with
external_vocabulary_uri
value is edited via form, and the existingauthorized
value = TRUE, and the edits include clearing theexternal_vocabulary_uri
field (deleting its value), the value ofauthorized
should NOT be changed to FALSE on save of form.
Not sure if this is possible, where to do it, or what the right search terms are to find out. The conditional fields module seems to be for something different.
Any pointers?