Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The following dependency is given:
field_foo_bar field_bar field_foo_bar is invisible when field_bar has value "7".
The problem is at when displaying the node, the foo_bar field is not shown (the field_bar is not 7 surely).
It seems that in conditional_fields_entity_view_alter(), it does not care about negated conditions.
Comment | File | Size | Author |
---|---|---|---|
#5 | Screenshot from 2016-01-16 18:12:56.png | 130.11 KB | shayoni92 |
#3 | conditional_fields-description_is_confusing-1334236-3.patch | 3.26 KB | Anonymous (not verified) |
|
Comments
Comment #1
Aron NovakComment #2
peterpoe CreditAttribution: peterpoe commentedWhen displaying the entity, if the "Hide the dependent if the dependency is not triggered" option is active, we evaluate if the condition was triggered. So, if field_bar has value 7, the dependency is triggered. Conversely, if field_bar has value != 7, field_bar is hidden.
This happens independently from the "Form state" option.
The problem here is that the description of the dependency is confusing on this matter, so I'm changing the title of the issue.
And yes, it would be nice to have many more "Entity view" options on triggered conditions. Marking it as "TODO" :)
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedWe were facing the same issue. The description in case of entity reference and term reference had the term id/entity id instead of term name/entity title. Providing a patch to show term name/entity title
Comment #4
karsumit94 CreditAttribution: karsumit94 commentedReviewed and tested. The patch by @monojit256 fixed the issue.
Comment #5
shayoni92 CreditAttribution: shayoni92 commentedThis patch works for me.
Comment #6
dqdMany things have changed already in newer versions on this regard. Apart from that:
Thanks for the report and all the efforts in here. But due to inactivity in this issue for some years and because of the upcoming EOL of Drupal 7, I will close this issue on the way by cleaning up the issue queue.
Feel free to re-open as "Needs review" if you found a solution or have a patch to be reported to help others on this outdated version.
If you think this issue or missing feature should be addressed in a newer Drupal core 8 and above compatible version of this project, then please file a new issue to the latest dev.