Or better:
def balloon(comment)
return DIV('[read more]',SPAN(comment),_class='balloon')
Field(....,comment=balloon(T('Explanation for what to enter into title
that goes on and on and on')))
Then in CSS have something like:
div.balloon{
position:relative; /*this is the key*/
z-index:24; background-color:#ccc;
color:#000;
text-decoration:none}
div.balloon:hover{z-index:25; background-color:#ff0}
div.balloon span{display: none}
div.balloon:hover span{ /*the span will display just on :hover state*/
display:block;
position:absolute;
top:2em; left:2em; width:15em;
border:1px solid #0cf;
background-color:#cff; color:#000;
text-align: center}
from http://psacake.com/web/jl.asp
On Jan 11, 10:18 pm, mdipierro <[email protected]> wrote:
> def balloon(comment)
> return DIV(comment, _class='hidden', _onmouseover='jQuery
> (this).fadeIn()', _onmouseout='jQuery(this).fadeOut()')
>
> Field(....,comment=balloon(T('Explanation for what to enter into title
> that goes on and on and on')))
>
> Never underestimate the power of helpers and jQuery.
>
> On Jan 11, 9:13 pm, iiijjjiii <[email protected]> wrote:
>
> > I have a form where one field requires a comment to explain what to
> > enter. The explanation is quite lengthy so I'd rather replace it with
> > a link or a "help"
> > icon. I can't figure out a way to do this.
>
> > Currently:
>
> > form=form_factory(
> > db.Field('title',
> > default='default title',
> > comment='Explanation for what to enter into title that goes on
> > and on and on',
> > ))
>
> > Preferrably (this doesn't work):
>
> > form=form_factory(
> > db.Field('title',
> > default='default title',
> > comment=URL(r=request,f='help'),
> > ))
>
> > Has anyone come up with a creative way to handle this?
>
> > Regards,
> > Jim
>
>
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en.