Thanks On Tuesday, January 28, 2020 at 4:19:42 PM UTC+2, John Bannister wrote: > > 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) > > > > *From:* web...@googlegroups.com <javascript:> [mailto: > web...@googlegroups.com <javascript:>] *On Behalf Of *António Ramos > *Sent:* 28 January 2020 14:49 > *To:* web...@googlegroups.com <javascript:> > *Subject:* Re: [web2py] Displaying only certain fields of choice with > SQLFORM(...) update > > > > did you also tried writable=False > > When a field is marked with 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. > > > > db.table.var.readable= db.table.var.writable=False > > > > Em ter., 28 de jan. de 2020 às 13:21, mostwanted <godir...@gmail.com > <javascript:>> escreveu: > > I did employ this method (db.quotation.beforeVat.readable=False!!! ) in my > controller but it didnt respond, its actually the first thing i tried! Its > just that i was hoping SQLFORM() may have some helpers as part of its > signature that i dont know about that I could use. > > On Tuesday, January 28, 2020 at 12:50:31 PM UTC+2, Ramos wrote: > > Look in the docs .... > > > > http://web2py.com/books/default/chapter/29/07/forms-and-validators > > 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. > To view this discussion on the web visit > https://groups.google.com/d/msgid/web2py/281ed3a3-66df-4eae-8768-1b9618c6093a%40googlegroups.com > > <https://groups.google.com/d/msgid/web2py/281ed3a3-66df-4eae-8768-1b9618c6093a%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > -- > 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 <javascript:>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/web2py/0320799e-d6df-4e35-880e-26b902511278%40googlegroups.com > > <https://groups.google.com/d/msgid/web2py/0320799e-d6df-4e35-880e-26b902511278%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > -- > 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 <javascript:>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/web2py/CAEM0BxPAez734JH9mwpBbKkecjV5WS6dKSJMTbDEB5Q9HrUyEw%40mail.gmail.com > > <https://groups.google.com/d/msgid/web2py/CAEM0BxPAez734JH9mwpBbKkecjV5WS6dKSJMTbDEB5Q9HrUyEw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . >
-- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/2fb1dba3-7b8a-4819-8b98-880107094b52%40googlegroups.com.