--
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+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/281ed3a3-66df-4eae-8768-1b9618c6093a%40googlegroups.com.
Look in the docs ....in your controller before showing your form,db.yourtable.yourfield.readable=False!!!
Em ter., 28 de jan. de 2020 às 10:29, mostwanted <godir...@gmail.com> escreveu:
--I was wondering if there is a way to show the SQLFORM() with only certain fields for the user during a form update & not show all the fields. SQLFORM.grid(...) has the field=None argument which enables one to select the fields to be displayed in the view, is there something like that for SQLFORM(....)?I have some fields which only do calculations in my db tables & those are the fields I wanna hide during updates.Regards;Mostwanted
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 web...@googlegroups.com.
writable=False
, the field is not shown in create forms, and it is shown readonly in update forms. If a field is marked as writable=False
and readable=False
, then the field is not shown at all, not even in update forms. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/0320799e-d6df-4e35-880e-26b902511278%40googlegroups.com.
If you don’t want the field to be displayed in the SQLFORM() you need to set as follows:
db.table.fieldname.readable = db.table.fieldname.writable=False before the form initialisation.
So something like :-
db.dog.owner.readable=db.dog.owner.writable=False
form = SQLFORM(db.dog)
if form.process().accepted:
…..
….
return dict(form=form)
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/CAEM0BxPAez734JH9mwpBbKkecjV5WS6dKSJMTbDEB5Q9HrUyEw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/0320799e-d6df-4e35-880e-26b902511278%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/0320799e-d6df-4e35-880e-26b902511278%40googlegroups.com.
--
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 web...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/CAEM0BxPAez734JH9mwpBbKkecjV5WS6dKSJMTbDEB5Q9HrUyEw%40mail.gmail.com.