Yii Framework Forum: Checkboxlist - Inputs Inside Labels - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Checkboxlist - Inputs Inside Labels Rate Topic: -----

#1 User is offline   Lilt 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 53
  • Joined: 06-July 10

Posted 10 October 2012 - 09:33 AM

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?
0

#2 User is offline   SaulBW 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 17-October 12
  • Location:Cape Town, South Africa

Posted 14 January 2013 - 09:23 PM

+1

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

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users