a, that's what i'm lacked off, not created the css classes for green and red classes. thank you so much, anthony. btw, the piece of code above is not completed, here is the complete code : e.g. def on_define_product(table): if 'product' in request.function : if table.signoff == 'No': table.signoff.represent = lambda signoff, field: SPAN(signoff, _class = 'text-error') elif table.signoff == 'Yes': table.signoff.represent = lambda signoff, field: SPAN(signoff, _class = 'text-success')
db.define_table('product', Field('title'), Field('signoff'), on_define = on_define_product, format = '%(title)s') tested work in smartgrid, anthony code is more simple (this is just another way to accomplish it). best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.