Could it be that when the dependee is a Select List (combo box), it is always considered "filled", even when it is still in its default state? By default state I mean the value you see when the page is loaded, most of the time it's something like "- Select a value -" or "- None -".
Intuitively I would think that state would count as "Empty", but apparently it is considered "Filled", basically rendering me unable to ever returning an "Empty" from a Select List.
Is this intended behaviour? The way I solve the issue now is to actually hide the dependent, as long as the value of the dependee is "- Select a value -", so the dependent would become visible when any "real" value is selected.
Comments
Comment #1
Puppetmast0r CreditAttribution: Puppetmast0r commentedComment #2
jeffschulerI'm experiencing this too. My workaround was to look for value not equal to "_none".
This is the case in the latest 3.x-dev (7.x-3.0-alpha1+12-dev) with the latest jQuery Update 2.x-dev (7.x-2.3+17-dev) as well as with the recommended versions of both.
Comment #3
ladybug_3777 CreditAttribution: ladybug_3777 commentedThe workaround jeffschuler describes works with the exception of " Reset the dependent to its default values when the form is submitted if the dependency is not triggered." If I pick a value and fill in my secondary field, then change it back to "None" the secondary field still keeps its value instead of it being reset.
When I specifically list each value in the select list everything works fine. That's a bit annoying though because I have to keep updating the Dependency whenever a new value is added to my select list.
Comment #4
zmove CreditAttribution: zmove commentedcan confirm the problem too...
Comment #5
dqdThanks 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 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.