Hi, this is a wonderful piece into the Entities arsenal on Drupal! :-)

I'm trying to configure the visibility of a field based on a boolean field... but it doesn't work. There is no condition to select when using booleans. I guess it considers a boolena field with a value of "0" to have a value, because "Hide when target field is empty" is not working. And if I use "Hide when target field has an string" (comparing to "0") it doesn't work either.

Any idea?

Comments

swentel’s picture

Title: Does it work with booleans? » Add support for booleans
Category: bug » task
JordiTR’s picture

I have to say that after many months I've tried it again and it works!

I can't understand what happenned when I tried the first time. On the same site I've used "Hide when target field has an string" using "0" and "1" (which are the values that I'm using on that boolean field) and everything worked fine. Thanks!

JordiTR’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)
knalstaaf’s picture

It may be confusing or work with the "empty" options. Better is to use "contains a string" (e.g. "0") when it comes to booleans.

It's also possible that you have to re-save a node before you see it in effect.

rootwork’s picture

Title: Add support for booleans » Document how to use with booleans
Version: 7.x-1.0-beta2 » 7.x-1.x-dev
Status: Closed (works as designed) » Active

Weirdly, I've discovered that this only works if the "string" you use is 0 or 1. That makes sense even if you change the values -- i.e. the "strings" you see displayed on the front-end -- to different values (say "Yes" and "No").

I'm not sure if that's a bug strictly speaking, but it is a little confusing. Could this be documented?