Currently it appears that when orphaned items are hidden they are completely unset as per these lines:
unset($form[$field['control_field_in_group']][$field['field_name']]);
unset($form[$field['field_name']]);
Could it be changed to set '#access' to false instead of completely unsetting it? Doing so would allow other (most likely custom) modules to override conditional fields' decision without needing to recreate the relevant portions of the $form array. Would doing so lead to unforeseen consequences?
Comments
Comment #1
peterpoe commentedI did as you suggested in nodeapi (node view). It is already in 1.0.
But still not in form_alter, because it caused problems with required fields. Will look into it though.
Cheers.
Comment #2
peterpoe commentedUsing #access everywhere now.