[dev] RFC: Horde_Form Rewrite's XHTML Output
Chuck Hagenbuch
chuck at horde.org
Sun Aug 7 15:18:05 PDT 2005
Quoting Matt Warden <mwarden at gmail.com>:
> http://24.210.248.187/incubator-form/test.php
>
> If you have a chance, please take a look at the XHTML source and let
> me know if you have quibbles about how I am doing anything. I have not
> found a good way to clean up how the JavaScript is output and I have
> also not found a good way to gather all the hidden fields in a single
> fieldset.
For hidden fields, how about instead of having field renderers output
hidden fields directly, have them make a call to a form renderer
callback, then at the end of rendering the form, render all of the
hidden fields at once then.
You could possibly do something similar for the javascript.
The only specific xhtml quibble I see is that the form-notes divs
should be inside of the form-input div that they are for, to give them
some kind of a semantic/programmatic relationship (otherwise if you
wanted to do something with them DOM-wise, you'd have to rely on the
ordering of elements in the page).
My main but vague complaint is that it looks kind of like div soup
instead of table soup. There are a number of places where it seems like
you should be able to specify classes through better selector usage
instead of explicit class="" tags; for instance, the <fieldset
class="horde-form"; I see a few different kinds of fieldsets, and while
I'm not sure they're all necessary (is it required for hidden elements?
Given that fieldset is explicitly intended for visual grouping, seems
weird), but one of them should be the default - form fieldset { ... }.
Maybe some things like the notes would be better expressed as <p
class="note"></p>, or <label class="note">, or <legend>... etc. I'd
like to see different tags used where possible, and less divs in
general. And more styling through inherited selectors instead of direct
application of classes to most elements.
-chuck
--
"But she goes not abroad in search of monsters to destroy." - John
Quincy Adams
More information about the dev
mailing list