Also, what does form_grid.html look like?

-Jim

On Tuesday, April 23, 2013 9:31:07 AM UTC-5, Tito Garrido wrote:
>
> Hi Folks!
>
> I am trying to use a custom form layout when I click on "Add" in a 
> SQLFORM.grid...
>
> I could customize it but when I try to create a record nothing happens...
>
> What am I doing wrong?
>
> def mygrid():
>     form=None
>     
> grid=SQLFORM.grid(db.mytable,csv=False,deletable=False,details=False,user_signature=False,formname='grid_anuncio')
>     if request.args(0) in ['new']:
>         response.view = 'painel/form_grid.html'
>         form = grid.create_form
>     if request.args(1) in ['edit']:
>         response.view = 'painel/form_grid.html'
>         form = grid.update_form
>
>     return dict(form=form,grid=grid)
>
> -- 
>
> Linux User #387870
> .........____
> .... _/_õ|__|
> ..º[ .-.___.-._| . . . .
> .__( o)__( o).:_______ 
>

-- 

--- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to