Checkboxlist - Inputs Inside Labels

Hi,

I’d like to request the ability to add check-boxes inside labels. This is valid by the HTML spec and allows for labels & checkboxes to be kept inline, in containers without a fixed width, ensuring that the checkbox is always beside its label (assuming the label is display block or inline-block).

If the input is outside the label, the second element may be bumped to the next line. This could be done with another element around the pair, but when this is added for every checkbox this becomes tedious. Also, the extra element is not clickable to select the checkbox, while the label would be.

I think this could be done fairly easily with an htmlOptions flag (inputInLabel?) or with a special template item "{inputlabel}".

What do people think?

+1

I’ve been trying to get this right for an hour now. Seems I’ll have to extend the class after all.

i’ve got the same problem, then i see the code inside the framework, i found this way.

You can use this template instead.


 {beginLabel} {input} {labelTitle} {endLabel} 

.

Templates are awesome, but, where do I put this ? labelEx or checkBox ?