My mistake. I tend to redirect because I need some extra processing but grid does actually produce a basic edit form. If you do use the grid generated form then the submit should work as normal though. You should check where it is failing - e.g. when you press submit is it actually calling the controller?
On Nov 3, 2:16 am, Mike Veltman <mike.velt...@gmail.com> wrote: > Now I think of it, you do not need to do a redirect because it creates its own > page based on the called page. > > Its just that the submit does not do anything. > > > > > > > > > > > > > SQLFORM.grid does not actually add the records automatically. It just > > calls the grid controller with args action/table. > > > You have to do something like: > > if request.args(0) in ("edit", "new"): > > redirect(URL("edit.html", args=[request.args(1), > > request.args(2)]) > > > On Nov 2, 9:15 am, Mike Veltman <mike.velt...@gmail.com> wrote: > > > > are you able to see the form? or are you getting the "not authorized > > > > message?" > > > > > you can set user_signature=False or ensure that user is logged in. > > > > Thanks for the reaction. But no the form is generated perfectly. And the > > > user is logged in. > > > > > On Wed, Nov 2, 2011 at 6:50 AM, Mike Veltman <mike.velt...@gmail.com> > wrote: > > > > > I have > > > > > grid = > > > > > > SQLFORM.grid(query=db.lvstorage.setup_id==usedsetupid,csv=False,detai > > > > > ls=T rue,searchable=True) > > > > > > That creates a form with the records with a add button. But when I > > > > > use add I > > > > > get the next screen but the record is not added. What do I miss ? > > > > > > Btw is the same setup with a query possible with SQLFORM.smartgrid ? > > > > > > With regards, > > > > > Mike Veltman > > > > With regards, > > > Mike Veltman > > With regards, > Mike Veltman