"The position being taken is not to be mistaken..." 1
One thing that is new to Edge Rails lately is a <div style="margin:0;padding:0"> tag that wraps your FORM’s HTTP method input (<input type='hidden' name='_method' value='put' />).
The reason for this is because in XHTML the INPUT tag is not a valid child of a FORM element (why? I don’t know), so you have to wrap it in a block-level element. I’m 100% in support of Rails being validation-friendly, but I have one suggestion:
Instead of a DIV tag, would it be better to wrap the INPUT in a tag like <fieldset style='display:none'>? Although the DIV is sort of like the XHTML Everyman, the FIELDSET tag seems more FORM-appropriate. I’d submit a patch for this, but it’s more a preference than an enhancement. Any thoughts?
Trackbacks
Use the following link to trackback from your own site:
http://blog.12spokes.com/trackbacks?article_id=the-position-being-taken-is-not-to-be-mistaken&day=26&month=10&year=2006
Since it’s not meant to be seen, or heard, its semantics are less important, I guess. I mean any futuristic non-human agent that would care about the semantics would probably be using the XML API, and any humans aren’t supposed to hear/see/feel the element.
I suppose a fieldset might be more semantic, but then you are throwing in another fieldset, for a field you basically don’t want there except on submit. I could imagine, in theory applying some behavior to each group of fields by doing an $$(‘fieldset’).each and I wouldn’t actually mean I wanted the hacked in _method input to be included.