Tobias Xy, I'm loving 7.x-2.x-dev and got it working almost perfectly for my site except for just one thing. Here's how to reproduce the problem:

1) Create a field called "Controller" of field type "Boolean", widget "Single on/off checkbox".
2) Create a field called "Controlled" of field type "Entity Reference", widget "Autocomplete", and make it visible when "Controller" is set to unchecked.
3) Create new content by having "Controller" unchecked, which makes "Controlled" visible, and then check "Controller". You'll see that no matter what you do, "Controlled" does NOT disappear like it's supposed to.

In the second step, if you change "Autocomplete" to "Select list" and then go through the third step again and check "Controller", then everything works perfectly and "Controlled" disappears. So can you make it work for "Autocomplete" too? Thanks in advance.

Comments

Tobias Xy’s picture

Project: Field Conditional State (unsupported) » Field Conditional States
Issue summary: View changes
hass’s picture

I'm also using a lot of entity references with autocomplete. If that is really broken that's a heavy showstopper. I wouldn't wonder if core autocompletes may also broken.

Tobias Xy’s picture

Status: Active » Needs review
StatusFileSize
new1.47 KB

The appended patch will add support for entityreference.
Unfortunately visible/invisible won't work for the Autocomplete widget, because the #id isn't rendered on the top level,
but "Autocomplete (Tags style)" widget should work with visibility states too.

Tobias Xy’s picture

StatusFileSize
new2.48 KB

New patch.

  • Commit 3dd2d1e on 7.x-2.x by Tobias Xy:
    Issue #2123663: Support for entityreference
    
Tobias Xy’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.