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_urifield on my taxonomy term AND if there is a value in that field, the value ofauthorizedfield gets set to TRUE automatically -
otherwise, value of
authorizedfield 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_urivalue. It will be entered by the user. So it seems like something needs to happen to change the value ofauthorizedon form save? -
If existing term with
external_vocabulary_urivalue is edited via form, and the existingauthorizedvalue = TRUE, and the edits include clearing theexternal_vocabulary_urifield (deleting its value), the value ofauthorizedshould 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?