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

peterpoe’s picture

I 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.

peterpoe’s picture

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

Using #access everywhere now.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.