On Wed, 2010-12-29 at 23:55 -0700, Randy Fay wrote: > So are you saying that Earl Miles doesn't do some highly unusual > things? :-) > > I think my key point was that using #tree in a form_alter could have > unanticipated effects.
Not only could, but does. A lot of forms in core are not #tree'd, but have a hierchical build in the function that builds it. The side effect is that at validate (if any custom validation handler) / submit time, the handlers won't find their original data because the values will be a tree reflecting the form build instead of a flattened array. It happened to me once, I won't mess like that with core forms anymore :) But I still don't understand the real purpose of making form that are not #tree'd by the way. #tree is good, and at least it ensures that data will have the same structure than the form (and more than that, can avoid name conflicts). Pierre.