Yeah, this is minor, but I thought I should point it out, and see if anyone else noticed this:
I have a node type with an Unlimited value multigroup in it.
Within the multigroup:
- Nodereference field (1 value)
- Textfield A
- Textfield B
- Filefield/Image Upload (1 value)
In the node edit form: all the other field widgets display their corresponding labels, EXCEPT the image upload widget.
I added descriptive help text for the widget, and that displays just fine. I changed the widget label from "Image" to something else. Still doesn't show.
I printed the $form variable using Devel. The label value is there ($form['group_mygroupname'][0]['field_myimagefield']['#title'], $form['group_mygroupname'][1]['field_myimagefield']['#title'], etc). It's just not rendering in the multigroup area. Imagefield widgets outside of multigroups display widget label properly.
Yes, a tiny thing, but wanted to point it out.
Comments
Comment #1
markus_petrux CreditAttribution: markus_petrux commentedI think this could be fixed in filefield module itself.
CCK places the $field array in the form, in $form['#field_info'][$field_name], to allow other modules alter the field structure for the purposes of building the form, without the need to get the data using conetnt_fields(). That array in the form is modified by the multigroup module to alter the multiple attribute so that the widget of a multiple value field is rendered as a single widget for each subgroup of fields in the multigroup.
Sorry, I do not have the tools now to create a formal patch, but the change is pretty simple. You need to edit filefield_widget.inc and apply the following patch:
Et voilà, a FileField within the context of a multigroup defined to allow multiple values will now render the widget label.
Comment #2
quicksketchThanks, excellent advice markus_petrux! I'll have a look at this next time I'm working on FileField.
Comment #3
ccshannon CreditAttribution: ccshannon commentedYes, thanks! I'll give this a whirl very soon.
BTW, markus, thanks for all the work on improving the nodereference and multigroup functionality. Much appreciated!
Comment #4
aaront CreditAttribution: aaront commentedI was having this exact problem -- had a filefield in a multigroup and the label wasn't showing up. Tried markus' one-line change and it shows up perfectly now. Thank you so much! Just a little thing but an important thing for me.
Comment #5
quicksketchI've committed the fix suggested by markus_petrux in #1.