[web2py] Re: Show button in SQLFORM only if a value is present?

2015-06-11 Thread Niphlod
use the links argument links = [ ... dict(header='additional buttons', body=lambda row: BUTTON(.) if row.needs_button == 0 else '' ) ] On Thursday, June 11, 2015 at 12:45:29 AM UTC+2, LoveWeb2py wrote: I should have been more specific. I meant I

[web2py] Re: Show button in SQLFORM only if a value is present?

2015-06-11 Thread LoveWeb2py
Niphlod!! This is perfect! Exactly what I was looking for. Thank you! On Thursday, June 11, 2015 at 4:53:52 AM UTC-4, Niphlod wrote: use the links argument links = [ ... dict(header='additional buttons', body=lambda row: BUTTON(.) if row.needs_button == 0 else

[web2py] Re: Show button in SQLFORM only if a value is present?

2015-06-10 Thread 黄祥
yes, i think it's possible, another way around i think you can achieve it on models with represent 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

[web2py] Re: Show button in SQLFORM only if a value is present?

2015-06-10 Thread LoveWeb2py
I should have been more specific. I meant I want to create a SQLFORM.grid button and only have it show if a row.id value is present On Wednesday, June 10, 2015 at 5:42:33 PM UTC-4, LoveWeb2py wrote: I'd like to create a SQLFORM button, but only show the button if a value is present in the