Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This patch uses a blank div to allow block level ellements (like input> to go inside the form element per xhtml 1.0 specs. This patch works and validates, and is required for validation.
Robin
Comment | File | Size | Author |
---|---|---|---|
#5 | empty__div_form__item_fix.patch | 5.06 KB | Robin Monks |
#3 | empty div form item fix_0.patch | 5.06 KB | Robin Monks |
empty div form item fix.patch | 682 bytes | Robin Monks | |
Comments
Comment #1
Dries CreditAttribution: Dries commentedYes/no? Please advise. If this patch is required, we might want to revise the call sites of
form()
. I believe some are adding divs to solve exactly this.Comment #2
Robin Monks CreditAttribution: Robin Monks commentedYou're right, some calls are using
<div class="container-inline">
to do this. I'll find these instances and correct them, and then attach a new patch for this.Robin
Comment #3
Robin Monks CreditAttribution: Robin Monks commentedHere is the new patch, which also removes unneeded (AFAIK)
<div>
's from form's.Robin
Comment #4
Stefan Nagtegaal CreditAttribution: Stefan Nagtegaal commentedCould you please remove the spaces from your patch name? they break the link in e-mail clients quite often.. I would prefer not to use spaces at all inside patch filenames at all, I would encourage you to use something like 'patch_name.patch'..
Stefan
Comment #5
Robin Monks CreditAttribution: Robin Monks commentedOh bother...
Robin
Comment #6
Dries CreditAttribution: Dries commentedYou can't remove
container-inline
s; these ensure that the form elements are displayed asdisplay: inline
. Removingcontainer-inline
s breaks those forms!Comment #7
Steven CreditAttribution: Steven commentedApplied to HEAD. I checked and couldn't see any redundant divs. They are all either for
container-inline
or for use in themes.Comment #8
(not verified) CreditAttribution: commented