[Lift] Re: label tag for generated input

2009-04-14 Thread Dmitry Lipovoi
I know it, but I prefer to leave original mark-up in template, so html-coder can update it later. On Tue, Apr 14, 2009 at 1:32 AM, Timothy Perrett timo...@getintheloop.eu wrote: Errrmm, I think your mistaken in your example. I think you mean: lift:someSnippet form=post  p    label

[Lift] Re: label tag for generated input

2009-04-13 Thread David Pollak
def label(in: Elem): NodeSeq = label for={in \ @name} / ++ in bind(login, xhtml, username - label(SHtml.text(username, username(_))) How does that look? 2009/4/13 João Pereira joaomiguel.pere...@gmail.com Hello, I have the following snippet: HTML: div

[Lift] Re: label tag for generated input

2009-04-13 Thread João Pereira
it's looks great and works great too. :) thank you On Mon, Apr 13, 2009 at 5:18 PM, David Pollak feeder.of.the.be...@gmail.com wrote: def label(in: Elem): NodeSeq = label for={in \ @name} / ++ in bind(login, xhtml, username - label(SHtml.text(username, username(_))) How does that

[Lift] Re: label tag for generated input

2009-04-13 Thread João Pereira
I just missed that I really wanted something like: def label(in: Elem, labeltext: String): NodeSeq = label for={in \ @name}{labeltext}/label ++ in bind(login, xhtml, username - label(SHtml.text(username, username(_)),User Name) Great :) 2009/4/13 João Pereira

[Lift] Re: label tag for generated input

2009-04-13 Thread Charles F. Munat
The for attribute in the label element points at the input element's *id*, not it's name. Also, where is the label? You've got an element, but no label (unless I'm still asleep). http://www.w3.org/TR/html401/interact/forms.html#h-17.9.1 So this is actually quite easy: bind(login, xhtml,

[Lift] Re: label tag for generated input

2009-04-13 Thread Dmitry Lipovoi
... or You can set element's id manually in template: lift:someSnippet form=post p label for=usernameUsername/label br/ f:username f:id=usernameinput id=username type=text name=username value=username//f:url /p p f:submitinput type=submit value=Do It!//f:submit /p

[Lift] Re: label tag for generated input

2009-04-13 Thread Timothy Perrett
Errrmm, I think your mistaken in your example. I think you mean: lift:someSnippet form=post p label for=usernameUsername/label br/ f:username f:id=username / /p pf:submit //p /lift:someSnippet You don't need to manually populate content inside the bind placeholders - its

[Lift] Re: label tag for generated input

2009-04-13 Thread Charles F. Munat
Good point. You could do all the label stuff in the template, which is probably easier. Chas. Dmitry Lipovoi wrote: ... or You can set element's id manually in template: lift:someSnippet form=post p label for=usernameUsername/label br/ f:username f:id=usernameinput

[Lift] Re: label tag for generated input

2009-04-13 Thread João Pereira
Thank you. it's a lot easier, yeah :) On Mon, Apr 13, 2009 at 10:51 PM, Charles F. Munat c...@munat.com wrote: Good point. You could do all the label stuff in the template, which is probably easier. Chas. Dmitry Lipovoi wrote: ... or You can set element's id manually in template: