On Monday, June 10, 2019 at 4:11:25 PM UTC-7, Quang Lam wrote: > > Hi Dave, if i set the mode field to readable false and writable true, how > i can display the mode field in the view page. i know we can make it > temporarily readable true but i dont know how. > Please help. > > I'm going to wait to answer until I can access a system that isn't at the same site I am right now.
/dps On Monday, June 10, 2019 at 3:54:33 PM UTC-7, Dave S wrote: >> >> >> >> On Monday, June 10, 2019 at 3:38:09 PM UTC-7, Quang Lam wrote: >>> >>> Hi, but the things is i set the mode field to writable false, do you >>> think i am still able to access the mode by form.vars.mode? >>> >> >> If "the other script" runs server-side, it doesn't matter (but you won't >> be able to update the field in the record until you make it temporarily >> writable). >> >> But your question suggests you are running the script client-side. IIRC >> (caveat: I'm not Anthony), the field won't even be part of the form when >> you use the built-in helpers ( FORM, SQLFORM, etc)., and the accept process >> won't do anything with it. If may not show up as a form.vars value at all, >> but it may be in the request.post.vars ... I'm not going to check that at >> the moment. >> >> If you make the field readable = False and writable = True, the field >> won't be displayed by the form, but there will be a place in form.vars for >> it, and the accept process will validate it. >> >> /dps >> >> >> >>> On Monday, June 10, 2019 at 2:52:05 PM UTC-7, 黄祥 wrote: >>>> >>>> another way around perhaps can use onvalidation to insert the mode data >>>> at the same time when the user click submit >>>> ref: >>>> >>>> http://web2py.com/books/default/chapter/29/07/forms-and-validators#onvalidation >>>> >>>> best regards, >>>> stifan >>>> >>> -- 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/da46867d-435a-4bdf-bd4c-c4e8e2d2e0e7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.