Closed (fixed)
Project:
Drupal core
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Sep 2003 at 10:58 UTC
Updated:
16 Sep 2006 at 09:15 UTC
Jump to comment: Most recent file
form_submit() and form_hidden() don't wrap their output in a div or similar block element, this creates problems when trying to validate XHTML strict. Wrapping the return in a form_item(0, ....) seems to work fine.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | common.diff | 600 bytes | Zed Pobre |
Comments
Comment #1
ax commentedi think it is consensus that
form_*functions shouldn't be wrapped intoform_item()[1,2]. your problem would be much better fixed by adding an inner<div>to theform()function, ie.[1] Re: [drupal-devel] XHTML validity, part II | http://lists.drupal.org/archives/drupal-devel/2003-06/msg00172.html ("PROBLEM 2: common.inc form_* functions")
[2] Re: [drupal-devel] form_* functions | http://lists.drupal.org/archives/drupal-devel/2002-10/msg00676.html
Comment #2
Zed Pobre commentedAttached is a patch to add
Comment #3
tangent commentedThe previous attached file is not a good solution. The div ID must be unique so a class should be used instead.
If you submit a patch, use the unified option.
Comment #4
Steven commentedWe typically use dashes to separate css id's and classes rather than underscores. Also, the usage of id's is invalid as has been said already.
However, I feel that form_hidden and form_submit is not the place to modify this, as wrapping the buttons in a div means that every one of them occupies its own line (and no, setting the div to inline display is not a good work around). This is bad for forms with multiple buttons (like the node submission form). Instead, we should find a solution that still allows for multiple buttons, preferably wrapped inside only one div per button set.
Comment #5
killes@www.drop.org commentedSteven didn't like it == zero chance for commit.
Comment #6
killes@www.drop.org commentedIs this still an issue in cvs with the new forms?
Comment #7
chx commentedhttp://validator.w3.org/check?uri=http%3A%2F%2Fdrupal.org only comes up with the well-known wbr non-issue.
Comment #8
(not verified) commented