- Issue created by @RichardDavies
Field States UI rules don't always work correctly when they're based on fields that also have restricted permissions via the Field Permissions module. If a user doesn't have permissions to edit a field, that field can't reliably be used as a target field in a Field States UI rule.
I have a node type with a Boolean field that only a user with an admin profile can set (Field Permissions module's behavior) and a text field that can be shown in edit form only if the boolean field is true (Field States UI behavior).
When I am logged in as admin, all work great: if I check the boolean field, text field shows up and then hides when I uncheck the boolean field.
Now as administrator I uncheck the boolean field and save the node.
Then as another user having another role (who still has edit rights on my test node of course) I edit the node. I don't have access to the boolean field with this role, but the boolean was previously set to false when I saved it as admin. Regardless, now the text field incorrectly is visible for this user despite Field States UI rule that should make it hidden when Boolean is unchecked.
Active
3.0
Code