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/777a451e-0cb6-4fa7-9f3c-81d1f3fecd0a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.