Google Groups

Re: [Lift] Modify Checkbox HTML code generated by MappedBoolean

Robert Marcano Apr 25, 2012 4:30 PM
Posted in group: Lift
On Tue, Apr 24, 2012 at 11:16 AM, Sam <> wrote:
I wanna there has a text label "Active" behind the checkbox to generate the HTML code like this:

            <input value="true" type="checkbox" name="F280400493864BO3SHX" checked="checked">Active</input>

I've tried to override formElemAttrs, but not work. 

Are there other ways?

Override toForm

override def toForm = super.toForm match {
  case Full(n) => Full(<label>{ n } Active</label>)
  case x => x

Note: input element has no content modes (must not have child nodes), use label

Robert Marcano