[web2py] Re: SQLFORM.grid different classes for add and edit forms

2015-08-11 Thread JorgeH
cool this should go in the manual On Tuesday, August 11, 2015 at 8:03:44 PM UTC-5, Massimo Di Pierro wrote: > > This works but there is a proper way: > > {{if grid.update_form:}} > ... > {{if grid.create_form:}} > ... > {{if grid.view_form:}} > ... > {{else:}} > ... > {{pass}} > > On Monday, 10 Au

[web2py] Re: SQLFORM.grid different classes for add and edit forms

2015-08-11 Thread Massimo Di Pierro
This works but there is a proper way: {{if grid.update_form:}} ... {{if grid.create_form:}} ... {{if grid.view_form:}} ... {{else:}} ... {{pass}} On Monday, 10 August 2015 13:52:52 UTC-5, Yoel Benitez Fonseca wrote: > > you can tell when u are editing or creating by the args passed in > request.

[web2py] Re: SQLFORM.grid different classes for add and edit forms

2015-08-10 Thread Yoel Benitez Fonseca
you can tell when u are editing or creating by the args passed in request.args, for example in the view: {{if 'edit' in request.args:}} // do something {{elif 'new' in request.args:}} // do other thing {{pass}} El lunes, 10 de agosto de 2015, 12:13:53 (UTC-4), Najtsirk escribió: > > Hello,