def controler_update(): from gluon.tools import Crud crud = Crud(db)
crud.update(db.tablename, id) db.tablename.field.readable = False db.tablename.field.editable = False return dict(form=crud()) 2015-09-14 14:37 GMT-03:00 Diego Tostes <tostes.pyt...@gmail.com>: > like this: > > def controler_update(): > from gluon.tools import Crud > crud = Crud(db) > > > > crud.update(db.tablename, > db.tablename.field.readable = False, > db.tablename.field.editable = False, > id) > > return dict(form=crud()) > > > regards > > diego > > 2015-09-14 13:49 GMT-03:00 Richard Vézina <ml.richard.vez...@gmail.com>: > >> I you want to prevent some fields to appears and be created/updated in >> your form put this in you controller before form declaration : >> >> db.table.field.readable = False >> db.table.field.writeable = False >> >> Richard >> >> On Mon, Sep 14, 2015 at 12:47 PM, Diego Tostes <tostes.pyt...@gmail.com> >> wrote: >> >>> Hi, >>> >>> I neew to create a form to edit a existing table element, but i do not >>> want to expose all the fields of the table to update. >>> >>> is that possiblem using sqlform or crud form? or i need to build a >>> custom form at the viw and create a controler to update the table? >>> >>> rgds >>> diego >>> >>> -- >>> 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. >>> >> >> -- >> 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. >> > > -- 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.