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
Comment #1
peterpoe CreditAttribution: peterpoe commentedAs 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
Comment #2
bendev CreditAttribution: bendev commentedthis works in node editing form but not yet on node view....
could you please check ?
thanks
Comment #3
peterpoe CreditAttribution: peterpoe commented#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.
Comment #4
bendev CreditAttribution: bendev commentedit seems to work fine now... thanks for the hint...