Can you please post the complete controller ? I still don't understand when you say "the view is ok, but request.post_vars is empty". If you built a view in web2py, and it's tied to that controller, it's impossible that the view can "see" something that the controller "isn't seeing".
On Saturday, September 22, 2012 3:25:09 PM UTC+2, thinkwell wrote: > > Yes, the form was generated outsite web2py and posted to the web2py > controller "submit_site". My frustration is that in the controller, > response.post_vars.submit_ip (and all form fields) have a value of None, > but in the VIEW, they show correctly. WHY!? > > It can't be blamed out the external form because the request.post_vars > values show up correctly in the VIEW. How can I access them in the > controller? > > On Saturday, September 22, 2012 7:22:10 AM UTC-4, Niphlod wrote: >> >> I didn't get the problem. Wasn't the form generated "outside" web2py and >> you wanted web2py only to catch the submitted part ? >> >> request.post_vars include every value (hidden or not) that the controller >> receives. if in response.post_vars there's no "submit_ip", than it's >> probably your "outside" form that has something not working. >> >> On Saturday, September 22, 2012 12:49:11 AM UTC+2, thinkwell wrote: >>> >>> One more question - here's how I redid the controller because I need >>> these values for hidden fields in the web2py form. >>> >>> def submit_site(): >>> site = request.post_vars.submit_url >>> ip = request.post_vars.submit_ip >>> >>> However, that only results in values of None. Why can't I use >>> request.post_vars.submit_ip in the controller? I built the form >>> successfully in a view, but I was hoping to build the form in the >>> controller so I can use validation on some fields. How can access the form >>> data inside the controller? >>> >> --