I set it so that orphaned fields would be displayed when triggered. (i.e.: The controlling field, while not editable, has an appropriate triggering default value, or were previously set by someone with permissions to edit the field in question.)

However, even when the controlling field (field_ticket_state) held the appropriate value to show the controlled field (field_proofs_okay), said controlled field was not displayed.

In function: conditional_fields_node_editing_form
if (!$show_triggered || !in_array($form_state['values'][$field['control_field_name']][0]['value'], $field['trigger_values'])) {

^--- $form_state['values'] is not set in my case.

So I worked around it by changing these lines to:
if (!$show_triggered || !in_array($form[$field['control_field_in_group']][$field['control_field_name']]['#value'][0]['value'], $field['trigger_values'])) { /*In Group, haven't tested this yet. */

 if (!$show_triggered || !in_array($form[$field['control_field_name']]['#value'][0]['value'], $field['trigger_values'])) { 
/*Not in group, verified to work sometimes. Best way to do this? */ 

Comments

peterpoe’s picture

Version: 6.x-1.0-beta2 » 6.x-1.x-dev
Status: Active » Fixed

As usual, the bug you reported was hiding another bug :(
Fixed in dev: now orphaned fields in node editing form should display or hide properly.

Thanks

bendev’s picture

Status: Fixed » Needs review

this works in node editing form but not yet on node view....

could you please check ?

thanks

peterpoe’s picture

#2 Node view is working for me. Make sure that "Reset untriggered fields to default values" is unchecked, or untriggered controlled fields will never appear unless they have a default value different than none.

bendev’s picture

Status: Needs review » Closed (fixed)

it seems to work fine now... thanks for the hint...