make the label tag magic
Reported by Matt Jones | December 3rd, 2009 @ 09:36 PM | in Beyond Hobo 1.0
Was stunned to find out that:
<label:foo />
didn't do the sensible thing (generate a label attached to the foo field, with text from the relevant view hint).
The logical way to handle this parallels the existing behavior of the a tag (or the form tag): passing an explicit for= attribute gets a standard label tag. Otherwise, you get a label tag for the current field, with the body filled in correctly if it's missing. Would be a very short addition, and match the input tag nicely.
Not technically a defect, but felt like one because it was missing...
Comments and changes to this ticket
-
Tom Locke December 5th, 2009 @ 10:53 AM
Yeah nice idea. You can then also do
<with:foo><label/><input/></with>
:)
My only concern is that we need a unique ID in order to associate the label with the field right? At the moment we let Rails add an ID to the inputs but are we sure they are unique? The Rails approach (model_field) seems a bit sloppy. Won't it break e.g. with an
<input-many/>
? -
Matt Jones January 12th, 2010 @ 07:06 PM
- State changed from new to open
- Milestone changed from Hobo 1.0 - Final to Beyond Hobo 1.0
Nice to have - we'll revisit after 1.0 drops!
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป