The label of the field collection is rendered in the header of the first column of the table (the column with the dragable cross) if the field collection is rendered as table. Thus the first column always becomes wider than necessary.
The labels on edit forms are always rendered as separate divs above the field itself. Why not with field collection tables? You even can not modify the table header with css (e.g. hide this header) because there is the sticky table header which displays the header anyway (in the dimensions before the css is applied).
| Comment | File | Size | Author |
|---|---|---|---|
| #19 | hide or remove.png | 8.73 KB | karimiehsan1819 |
| #1 | field_collection_table-1396056-1.patch | 2.71 KB | tim.plunkett |
Comments
Comment #1
tim.plunkettCan you try this patch?
Comment #2
lukusI applied the patch in #1.
Comment #3
lukusMade an alternative patch based on http://drupal.org/node/1400266.
Comment #4
lukusWrong labelling on the patch above .. sorry!
Added another here.
Comment #5
tim.plunkettThis should address the problems identified in #2.
Comment #6
rlmumfordHere's an updated version of the patch that puts an empty header column in, rather than making the first column colspan 2.
Comment #7
lukusHi
I applied the patch in #6 an it works well. Can it be committed?
Comment #8
mpisano commentedPatch #6 works ok.
Comment #9
attiks commentedWorking as expected
Comment #10
rooby commentedPatch in #6 does what I would expect it to.
Comment #11
nerdoc commentedPatch #6 works for mee perfectly.
Can this be committed?
Comment #12
nancydruPatch applied cleanly to current checkout.
Comment #13
lunk rat commentedPatch #6 working great in production for a few months. Please commit.
Comment #14
StG commentedHello,
I also applied the patch in #6 and it worked as intended except one important aspect. It mixed up the order of the element of $output variable: 1. "add more" button, 2. description of the field, 3. the table of the field collection, 4. label of the field. I had to add a #weight attribute to each child of $output in order to fix it, like this:
Comment #15
kaareI've committed a variant of #6 to the Form element layout project in #2366967: Help text appears above label for multi value fields. This can be used as a workaround for this issue. Enable
fel_fields.moduleand you're done.Comment #16
alx_benjamin commentedThis patch will add a widget option 'Display title above table' with default value set to TRUE.
Providing the value is set to true it will display title above the table.
Comment #17
kevineinarsson commentedNice patch, however it needs to be rerolled for the latest dev release or else we can't test the patch and commit it to the repository. Also, I'm not sure if this issue exists on that branch either, but I suspect it does. Changing the status to "Needs work" for now.
Comment #18
alx_benjamin commentedRecreated patch to be applied to origin/7.x-1.x branch
-------------------------------------------------
Sponsored by http://reallifedesign.co.uk/
Comment #19
karimiehsan1819 commentedhi , i want hide or remove label and border of field collection , how can i do them?