Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

html_checkboxes: label before input

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Feature Requests
View previous topic :: View next topic  
Author Message
cybot
Smarty Regular


Joined: 20 Apr 2005
Posts: 83

PostPosted: Tue May 10, 2005 10:49 am    Post subject: html_checkboxes: label before input Reply with quote

an option to place the label-text before the input-tag would be nice

(right aligned elements)
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Tue May 10, 2005 1:23 pm    Post subject: Reply with quote

It does put label tags around the checkboxes (?)

<label><input type="checkbox" name="checkbox[]" value="1000" />Joe Schmoe</label>
Back to top
View user's profile Send private message Visit poster's website
saerdna
Smarty Rookie


Joined: 12 Dec 2004
Posts: 20
Location: Linköping, Sweden

PostPosted: Thu Jul 07, 2005 6:56 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Thu Jul 07, 2005 7:52 am    Post subject: Reply with quote

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 Razz

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
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Feature Requests All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP