Anthony <abastardi@...> writes: > The only built-in methods for searching (via the user interface) are crud.search and SQLFORM.grid (and .smartgrid). > > def search_dogs(): > form, records = crud.search(db.dog) > return dict(form=form, records=records) > > or > > def search_dogs(): > return dict(form=SQLFORM.grid(db.dog)) # or form=SQLFORM.smartgrid(db.dog) to access linked tables > > - update/edit the various attributes for the dog concerned > > > Update forms are explained here: http://web2py.com/books/default/chapter/29/7#SQLFORM-and-insert/update/delete. Just pass the record as the second argument to SQLFORM. Note, if you use grid/smartgrid, this is all handled automatically. >
Thanks Anthony, I had tried SQLFORM.grid and did not get edit coming up... however your post made me look again more carefully. I needed: form=SQLFORM.grid(db.dog, user_signature=False) and *then* the edit button appeared automatically, awesome! Mark