I know this was a while ago, but I had a similar question and came across
this thread. You can turn off the built in edit button by choosing
editable=False, then create you own using links
def example():
query = db.sometable
links = [lambda row: A('Edit',_class='button btn
btn-default',_hr
And what about if I do want to create my own edit form from scratch? How do
I get the 'edit' button on the SQLFORM.grid to link to my custom form?
On Friday, February 21, 2014 2:32:25 PM UTC+1, Anthony wrote:
>
> You can also customize the edit form created by the grid in the usual ways
> (witho
Depends on exactly what you want to customize. First, the grid itself takes
an "onupdate" argument that it passes to form.accepts, and it takes an
"editargs" argument, which is a dict of arguments to pass to the edit form.
Aside from that, in your controller, you can do:
grid = SQLFORM.grid(db.
mmmh... sorry Anthony but you know i'm new on web2py... can you show me more in
deep this your last?
thank you
lucs
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Repo
mmmh... sorry Anthony but you know i'm new on web2py... can you show me more in
deep this your last?
thank you
lucs
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Repo
mmmh... sorry Anthony but you know i'm new on web2py... can you show me more in
deep this your last?
thank you
lucs
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Repo
You can also customize the edit form created by the grid in the usual ways
(without creating your own form from scratch), including having custom view
code or specifying an alternative view altogether.
Anthony
On Friday, February 21, 2014 7:57:42 AM UTC-5, Luca Guerrieri wrote:
>
> Looks like i
Looks like it's my tie to post an answer :-))
To customize the edit form or new form in a SQLFORM.grid i put in the
controller, but exactly
before the sqlform.grid creation and with a return ...
if request.args(0) in ['edit']:
response.flash=T("Edit form")
response.view = 'default/editclist.ht
8 matches
Mail list logo