Just to be clear regarding terminology, data do not pass from the view to the controller. Rather, the controller passes data to the view, which is then executed to generate HTML, which is sent to the browser. If there is a form on the page, when the user submits the form, the form data are sent from the browser back to the server and processed by a controller (in web2py, forms are typically posted back to the same controller that generated them). See http://web2py.com/books/default/chapter/29/03/overview#Postbacks.
Anyway, once a form has been submitted to a controller, the values from the form are available in request.vars (also in request.post_vars if submitted via POST or request.get_vars if submitted via GET). Furthermore, if using the FORM or SQLFORM helpers, after calling the .process() method, the post-validation form values will be available in form.vars. Anthony On Tuesday, January 5, 2016 at 10:09:07 PM UTC-5, Carlo Ghilardi wrote: > > Dear all, > I'm trying to learn Web2py, but I'm having hard time to play with Forms, > link HTML components like checkbox for instance. I'm not getting how can I > get from the view to controller the information on the checkbox or Textbox > or radio button, so in controller I can work with them and generate an > answer. > > So What I'm asking is a tutorial, how web2py can pass from the view to > controller, and vice-versa. A trivial one. > > I've tried to look on google, but people only show sample collecting and > storing data from the DB. > > What I've being looking for, is a view containing some radio buttons and > depending on witch one is selected I do an action. > > A checkbot selected I do an action. > > A Textbox, I can seve its value and do something in controller ... > > > > Well sorry for this dumb question, hope you can help me. > > > -- 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.