Description
In a node form array, the actual field array of type "#text" is located at something like "field_name[und][0][#value]". All the documentation of backdrop_process_states() describe it as working on the top level - ie setting $form['field_myfield]['#states']
. That's how it works in Drupal 7 & 8.
I'm finding, though, that I have to go down to the text field - set $form['field_myfield']['und'][0]['value']['#states']
. Setting at the initial field level has no or unexpected behavior. For instance, if the fields are inside a vertical tab fieldset, the whole fieldset gets set to "display:none;".
I am wondering if this is expected behavior? If it is, the documentation could be clearer about that. If not, then I suppose it's a bug.
This is in the Seven theme, if that's relevant. Backdrop 1.11.3.