I have a dependent A that toggles visibility of dependent B when it has a specific value. If A has 'value 1' then B is shown. If B has 'value 2' then C is shown. C is not hidden when A has a value other than 'value 1'. I have hide dependent if dependee is not visible checked. This is not taking effect.
First set up for conditions was:
field_summary_0_1 field_block_selection_1
field_summary_0_1 is visible when field_block_selection_1 has value "block_1".
AND
field_summary_0_1 field_selections_0
field_summary_0_1 is visible when field_selections_0 has value "track 1".
I also tried adding an invisible condition:
AND
field_summary_0_1 field_block_selection_1
field_summary_0_1 is invisible when field_block_selection_1 has none of the values: block_1.
Another condition makes field_selections_0 only visible when field_block_selection has the value "block_1".
Apparently field conditions is not applying bitwise AND with the states. How can I set these fields up so that field_summary_0_1 is no longer visible when field_block_selection_1 doesn't have the value "block_1"?
Comments
Comment #1
arosboro commentedI also tried the following which did not work:
field_summary_0_1 field_block_selection_1
field_summary_0_1 is invisible when field_block_selection_1 has none of the values: block_1.
XOR
field_summary_0_1 field_selections_0
field_summary_0_1 is visible when field_selections_0 has value "track 1".
1 xor 1 should evaluate to 0, but it's coming up as visible. It seems like the javascript states don't respect grouping.
I did some digging in the code and found: I did some snooping in the code and found:
[code]
[/code]
It was called after form validation though, I'm not sure it's used for the javascript states handler. The logic there makes sense though, and it should work.
Comment #2
arosboro commentedComment #3
arosboro commentedI didn't check in the lastest 3.x dev branch on git, so I didn't realize that this actually works as designed.
Comment #3.0
arosboro commentedUpdated issue summary.