-
Bug
-
Resolution: Won't Do
-
Major
-
1.2.3
The edit group field adds a set of edit fields within a group. In the dialog it asks for a group name which is indicated to be optional. The group name is in fact the controlName of the field. When binding the form will look at this paragraph and test for the controlName, if it's not there it will skip the paragraph, and all the fields it contains. If it's there it will be part of the form data with an empty value and its children will be bound as well.
We should either, remove the requirement of having a controlName on this field. Or clearly indicate that it's required, although binding it to the form data serves no purpose.
Note that the group name is also used as an id to the div containing the edit fields.
Original report from user-list:
I think to have found a bug inside [1]
When you build a groupEditField you can AVOID to insert a controlName property because in the dialog is not "required".
Even if you insert it, the "value" when you submit the form is empty.If the controlName property is not present, the field is skipped.
AND
the validation checks on the following lines (110 and 113) prevents to "look inside" the "edits" node to find nested fields.
SOLUTION (tested):
put the last part of if/else-if/else-if outside the "if" as shown on [2]------------------------------
[1] http://svn.magnolia-cms.com/view/community/modules/magnolia-module-form/trunk/src/main/java/info/magnolia/module/form/paragraphs/models/DefaultFormDataBinder.java[2] http://pastebin.com/yGKSNCMH
HTH to anybody else (and maybe next MGNL form module versions!!!)
Matteo