checkbox widget has styles divs,ul,table So may be new style which will give input inside label would work?
Thanks, пятница, 21 декабря 2012 г., 3:58:00 UTC+7 пользователь Anthony написал: > > Good point. It will probably have to depend on the formstyle used. > > Anthony > > On Thursday, December 20, 2012 1:57:16 PM UTC-5, Paolo Caruccio wrote: >> >> For completeness: >> >> wrapping the input controls with label should be avoided when for the >> layout is used a table. In such case the label goes in one TD and the >> associated control in another TD. >> Bootstrap, indeed, doesn't use table layout for the forms. >> >> >> Il giorno giovedì 20 dicembre 2012 16:50:47 UTC+1, Paolo Caruccio ha >> scritto: >>> >>> I think as Massimo said, but W3C raccomandation on >>> forms<http://www.w3.org/TR/html5/forms.html#forms> >>> tells: >>> >>> "To label a control, the label element is used; the label text and the >>> control itself go inside the label element." >>> >>> So KMax request should be acceptable >>> >>> >>> >>> Il giorno giovedì 20 dicembre 2012 15:57:03 UTC+1, Massimo Di Pierro ha >>> scritto: >>>> >>>> I am not convinced this is the right fix. Does bootstrap suggest this? >>>> I do not think the input should be in the label. Perhaps there is an >>>> alternative fix using css? >>>> >>>> On Thursday, 20 December 2012 03:08:01 UTC-6, KMax wrote: >>>>> >>>>> Hello, >>>>> >>>>> Using this widget=SQLFORM.widgets.checkboxes.widget for list of >>>>> values gives the following html code: >>>>> >>>>> <input id="some1" name="something" type="checkbox" value="1" /> >>>>> <label for="some1">Option1</label> >>>>> >>>>> <input id="some2" name="something" type="checkbox" value="2" /> >>>>> <label for="some2">Option2</label> >>>>> >>>>> While if INPUT reside inside LABLE it looks better (imho) >>>>> <label for="some1"> >>>>> <input id="some1" name="something" type="checkbox" value="1" />Option1 >>>>> </label> >>>>> >>>>> <label for="some2"> >>>>> <input id="some2" name="something" type="checkbox" value="2" />Option2 >>>>> </label> >>>>> >>>>> Same time this change might broke some compatibility. Maybe this >>>>> behavior was made for some reason. >>>>> Community, please share your opinion. >>>>> >>>>> Thanks, >>>>> >>>>> --

