The function exercise_submit is a bit strange. If there is a good reason for this function we should document it, if not the form should be rewritten so that the foreach part of the function won't be needed. I think we should be able to achieve the same using #parents: http://api.drupal.org/api/drupal/developer--topics--forms_api_reference....

Comments

icc’s picture

I have added documentation to the function that explains the issue in commit 4a760c1.

We must rewrite our form values to trees when the form is submitted. The reason for this is we can't have trees in the form if we want our fields to show up in CCK. CCK currently doesn't support trees. #parent is an attribute that describes trees.

icc’s picture

Status: Active » Fixed

Forgot to set the issue status to fixed.

falcon’s picture

Status: Fixed » Active

Are you sure about that? I think parent is used in cases where you can't use #tree. If you use #tree #parent us auto generated and you seldom need to use both.

icc’s picture

Status: Active » Fixed

The issue has been fixed in commit f868ed5, good work!

Status: Fixed » Closed (fixed)

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