• 2633 views
  • 0 comments
  • loading...

form.process()

form.process(...).accepted (the same as form.accepts(request.post_vars,session,...) ) does not need the request and session arguments (although you can specify them optionally). It also differs from accepts because it returns the form itself. Internally process calls accepts and passes its arguments to it. The value returned by accepts is stored in form.accepted.

Attributes / Arguments


If equal to 'flash' (default) and the form is accepted it will flash the above message_onsuccess.


Also onsuccess can be function like lambda form: do_something(form).

message_onfailure

If equal to 'flash' (default) and the form fails validation, it will flash the above message_onfailure.


Also onfailure can be function like lambda form: do_something(form).


loading...

Sources / Reference

" web2py Book Chapter 7: Forms and Validatators" is licensed under Creative Common License BY-NC-ND 3.0


Comments

loading...

Powered by
Web2py

Hosted on
www.pythonanywhere.com
(affiliated link)