|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
cybot Smarty Regular
Joined: 20 Apr 2005 Posts: 83
|
Posted: Tue May 10, 2005 10:49 am Post subject: html_checkboxes: label before input |
|
|
an option to place the label-text before the input-tag would be nice
(right aligned elements) |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Tue May 10, 2005 1:23 pm Post subject: |
|
|
It does put label tags around the checkboxes (?)
<label><input type="checkbox" name="checkbox[]" value="1000" />Joe Schmoe</label> |
|
Back to top |
|
saerdna Smarty Rookie
Joined: 12 Dec 2004 Posts: 20 Location: Linköping, Sweden
|
Posted: Thu Jul 07, 2005 6:56 am Post subject: |
|
|
mohrt wrote: | It does put label tags around the checkboxes (?)
<label><input type="checkbox" name="checkbox[]" value="1000" />Joe Schmoe</label> |
WROOOOONG
does labels on food in store contain anything but text? NO.
<label for="foo">text</label><input type="checkbox[]" value="1000" id="foo"> is a more proper way to do it.. |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Thu Jul 07, 2005 7:52 am Post subject: |
|
|
There is a related thread to saerdna's "suggestion": here. I think it was just never followed through perhaps because no one wanted to decide on the ID issue.
I don't really see the problem with putting in a left/right (or similar) boolean property for html_checkboxes so that it would emit the label text either prior or after the input tag and doing so would side-step the ID issue, at least for this purpose.
For the record, the "correct" way of using labels is according to the standard, not based on some arbitrary and (if I may say so) ridiculous comparison to food labels. AFAIK, both HTML4 and XHTML (at least up to 1.1) allow for <input /> tags to be contained within <label> tags and the for and id attributes are optional. Besides, the example given is hardly proper -- there is no type="checkbox[]" attribute value according to any standard and for the sake of XHTML compliance, Smarty seems to have adopted the practice of closing empty content tags with />. So saerdna, don't make me get all uppercase on you
I actually don't have any stake in this as I don't even use the plugin but when it comes right down to it, I would suggest that whatever style is compliant with the majority of browsers and is also standards compliant should be used, whatever that happens to be. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|