Change in orphan hiding method

ksun - October 22, 2009 - 01:26
Project:Conditional Fields
Version:6.x-1.0-beta2
Component:Code
Category:feature request
Priority:minor
Assigned:Unassigned
Status:active
Description

Currently it appears that when orphaned items are hidden they are completely unset as per these lines:

<?php
unset($form[$field['control_field_in_group']][$field['field_name']]);
?>

<?php
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?

#1

peterpoe - December 2, 2009 - 15:00

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.

 
 

Drupal is a registered trademark of Dries Buytaert.