Sorry, forgot that the label will get escaped. Anyway, there is now a fix
in trunk.
On Saturday, December 17, 2011 4:58:49 PM UTC-5, brushek wrote:
>
> > The bug isn't with LABEL, it's with SQLFORM.search_menu, which tries to
> > translate field.label without first converting to a string in case
> The bug isn't with LABEL, it's with SQLFORM.search_menu, which tries to
> translate field.label without first converting to a string in case the
> label is an HTML helper.
>
> Should be an easy fix, but for now, you can do:
>
> label=str(IMG(...))
>
> or
>
> label=IMG(...).xml()
None of this sou
The bug isn't with LABEL, it's with SQLFORM.search_menu, which tries to
translate field.label without first converting to a string in case the
label is an HTML helper.
Should be an easy fix, but for now, you can do:
label=str(IMG(...))
or
label=IMG(...).xml()
either of which will convert the
But...
LABEL have some bug:
http://code.google.com/p/web2py/issues/detail?id=566
On 16 Gru, 23:32, Anthony wrote:
> In your table definition, you can specify a 'label' argument for each
> field, and I think that can be whatever you want (e.g., an IMG tag, etc.).
>
> db.define_table('mytable',
Thank You, Anthony. It was... so easy!!! I was looking for some very
strange and wierd solutions, big + for You :).
regards
brushek
On 16 Gru, 23:32, Anthony wrote:
> In your table definition, you can specify a 'label' argument for each
> field, and I think that can be whatever you want (e.g., a
In your table definition, you can specify a 'label' argument for each
field, and I think that can be whatever you want (e.g., an IMG tag, etc.).
db.define_table('mytable', Field('myfield',
label=IMG(_src=URL('static','img/myimage.png'
Haven't tried it, but hopefully should work.
Anthony
O
6 matches
Mail list logo