I have a form created using the Islandora XML Form builder module. This form dynamically adds fields using AHAH. For a given fields set, the first fieldset will have a name like foo[0], the second foo[1], etc. Within this fieldset can be additional fields. So the bar field on the first would be named foo[0]bar, the bar field on the second is foo[1]bar, etc. If the bar field is itself a fieldset then the baz field on the 1st instance of the bar set in the second foo would be foo[1]bar[0]baz.
I need to modify this form to use the Drupal form states so that the visibility of foo[x]bar[y]baz is based on the value of foo[x]bar[y]qux. If I were writing pure jQuery, I could set the state based on $this().prev(":input[name$=qux]")
. Can I use this type of reference for the Drupal Forms States or can I only use absolute selectors?
Only absolute selectors work for the drupal states system.