Closed (fixed)
Project:
Exercise Planner
Version:
6.x-2.0-beta1
Component:
exercise
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
29 Mar 2011 at 17:45 UTC
Updated:
14 Apr 2011 at 13:01 UTC
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
Comment #1
icc commentedI 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.
Comment #2
icc commentedForgot to set the issue status to fixed.
Comment #3
falcon commentedAre 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.
Comment #4
icc commentedThe issue has been fixed in commit f868ed5, good work!