There's no reason you can't use a function in your first example: if form.process().accepted: oncreate_event(form)
You can also use the "onsuccess" argument: form.process(onsuccess=oncreate_event) The above will mainly be useful when you have also specified a "next" argument and need to do something before the redirect to "next". Anthony On Sunday, April 5, 2015 at 1:08:47 AM UTC-4, 黄祥 wrote: > > pardon me, i mean is i would like to have something like oncreate in > SQLFORM.grid using SQLFORM. > so i think if i have more than a function to record the activity of user > input using SQLFORM, it will efficient to put it on the function, so that > another function can use my custom oncreate function during form.process(). > about onvalidation, i already use it to assign another job (specific > document no format), can't be used in another function. > well i think the option are either to put the custom oncreate function > under the onvalidation (like your recommendation), or using the first > example that work. > > thanks and 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. For more options, visit https://groups.google.com/d/optout.