I agree - anything to encourage label's is great. Most browsers shift
focus to the "for" attribute on click. But even without that, a label
tag is semantically correct in describing a form element.

I submitted my first patch that add labels for the generated scaffold
source for resources:
http://dev.rubyonrails.org/ticket/7091


On 1/18/07, Jarkko Laine <[EMAIL PROTECTED]> wrote:

On 18.1.2007, at 12.04, Andrew Kaspick wrote:

>
> I thought rails needed a label helper at first, but then I decided
> that form builders fill the gap just fine as well as allowing more
> flexibility and control.
>
> I have my own form builder for example that automatically associates
> labels with my controls without me needing to specify them in my view,
> so this also cuts down on the code I need to write in my view.
>
> I figure not having a label helper in rails forces people to do things
> like use a form builder, which I think is the better approach.  It's
> sorta like how using form_tag in rails 1.2 can only be closed by using
> the '</form>' html tag.  It makes people think it doesn't feel right,
> which is why you use should use form_for instead.
>
> I personally say no to a label_helper in rails. :)

Andrew,

label_for is not meant to compete with custom form builders, it's
meant to complement them and be a building block for them and at the
same time be really useful for cases where you don't want to use a
full-blown builder. I would say anything that fosters the use of
label tags in Rails apps (*cough*, Basecamp login, *cough*) is
worthwhile.

//jarkko

--
Jarkko Laine
http://jlaine.net
http://dotherightthing.com
http://www.railsecommerce.com
http://odesign.fi






--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on 
Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to