grid.element('.web2py_form') is the FORM object, right? ...never had the 
idea to look in this direction - tanks a lot.

-WDK

On Monday, 11 January 2016 20:13:39 UTC+1, Anthony wrote:
>
> Presumably you only want to add a button to create and edit forms, so:
>
>     if 'new' in request.args or 'edit' in request.args:
>         grid.element('.web2py_form').add_button(...)
>
> Anthony
>
> On Monday, January 11, 2016 at 11:39:53 AM UTC-5, Wolf-Dieter Klotz wrote:
>>
>> I was struggling quite some time with web2py, but finally solved a lot of 
>> misunderstood problems myself. However I never succeeded in the following. 
>> In my controller I create a grid with form=SQLFORM.grid(...). form is 
>> not an object it is a member of SQLFORM. I want to add custom buttons to 
>> the grid, but can't use form.add_button(). To make it short, I never 
>> succeeded to add my custom buttons to the grid - only in the view with a 
>> <button> html tag. Is there an example how to add custom buttons to 
>> SQLFORM.grid() directly?
>>
>

-- 
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.

Reply via email to