Active
Project:
Drupal core
Version:
main
Component:
forms system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
10 Aug 2014 at 19:12 UTC
Updated:
16 Sep 2019 at 13:16 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #1
alimac commentedComment #2
alimac commentedComment #3
kaareI just wanted to give you a heads up about a new project that solves this for D7: Form element layout. I would love to see a similar solution for D8. Unfortunately my work requires me to be in D7 land for quite some while, so I have no time to help in this issue.
Comment #4
kaareOh and yeah. Label help doesn't solve this. Quoting from its project page:
…
Comment #5
kaareDunno if it is related, but one of the biggest problem I had with Form element layout fields was that I had no idea how field widgets would structure their forms. So where the
#descriptionfinally ended up (beeing rendered) wasn't possible to figure out programmatically, afaik. Maybe its easier in D8 now that field widgets have schema.Comment #6
penyaskitoIn multiple fields, the name of the field is output in the
<thead>of a table. How could we inject the description if we want to show it before the actual fields, but after the title?Comment #7
alimac commentedHm. What about using a
<caption>, which could then be positioned below or above the table using CSS? It won't put it in between thead and table contents, but given that multiple value form widget uses a table, it's different enough from single value form fields that it might warrant using a caption for description/help text.Comment #8
penyaskito@alimac: The caption is shown before the table (and the h4), so I'm not sure if that is a potential solution.
Comment #9
kaareI just opened #2371945: Move multivalue field's label out of rendered table to a separate <label> to provide HTML consistency that hopefully will move the label outside the table. Otherwise the help text will have to be rendered as a stand-alone table row after
<thead>and before the input elements. But that again opens the question if it's the right thing to render the help text as a table row at the end of the table also if#description_displayis set toafterfor multi value fields. The fact that the field's label is a part of the table is a really bad thing and IMHO borderline a bug.Getting momentum on the above issue will help this issue a lot.
Comment #10
mgiffordThere's no patch to work on.
Comment #11
mgiffordLet's bump this to 8.1.
Comment #12
mgiffordComment #14
imiksuCleaning up drupalcampfi tags.
Comment #19
jwilson3Since Label Help was mentioned in the issue description above, I thought I'd throw out that a Drupal 8 port has been created and along with the patch on #2948501: Improve Drupal 8 field compatibility, it is working nicely for a large number of field types, including multi-cardinality fields like those depicted in the screenshot of this issue's description above.
The Label Help module's D8 version tries to add the description to the #label_suffix, but since field-multiple-tables in Drupal 8 do not support #label_suffix, the patch on #2948501 simply appends the description to the #title so that it appears inside the
<h4 class="label>.While I'm not trying to change the purpose of this issue, it would be super slick if #label_suffix was just made to work with multi-cardinality fields.
Comment #20
jwilson3Comment #23
mlncn commentedComment #24
mlncn commented