The fields in your form are called "type", "name", "csvdata", "checkbox"
Your url is passing vars "admin", "email" "name" and "profile" So only "name" may be copied from request.vars to form.vars Anyway it is not copied because: 1) the from requires "csvdata" to be NOT_EMPTY and you are not passing that 2) you are using form.accepts(request.vars,session): Which is desigend to prevent double submissions and various types of attacks by hiding hidden one time tokens in the form and preventing validation if the form if the token is not returned. You can disable this by using form.accepts(request.vars,formname=None): and the request.vars.name will be copied in form.vars.name Hope this makes sense. On May 28, 9:47 pm, Dan <[email protected]> wrote: > On May 28, 6:41 pm, mdipierro <[email protected]> wrote: > > > Hi Dan, > > The information is passed from request.vars to form.vars only if the > > form processing it has INPUT fields receiving it. How does your form > > look like? > > This is my code defining the form: > > form=FORM(TABLE( > TR("Type of Input:",SELECT > ('option1','option2',_name='type',value='option1')), > TR("Name:",INPUT(_type="text",_name="name",value='')), > TR("CSV file contents:",TEXTAREA > (_name="csvdata",value='',requires=IS_NOT_EMPTY())), > TR("Simulation mode (don't insert):",INPUT > (_type="checkbox",_name="simulate",value='off')), > TR("",INPUT(_type="submit",_value="Submit")) )) > if form.accepts(request.vars,session): > > > > > Massimo > > > On May 28, 4:05 pm, Dan <[email protected]> wrote: > > > > Hello web2py masters- > > > I'm trying to get information into a form using URL parameters, but I > > > can't understand why it's not working. > > > > For example, why doesn't this URL work to send the information in? > > > > http://www.web2py.com/examples/form_examples/form?admin=False&[email protected]&name=test122&profile=blahasdasda&sure=yes > > the code for this one is shown in "Example 28" > here:http://www.web2py.com/examples/default/examples > > > > > > The URL's information shows up in the request.vars, as shown by the > > > debug link at the bottom of the page. But there is no indication that > > > the information has actually been processed. > > > > In my own app, I'm seeing a similar behavior where the information is > > > put into the request.var dict, but then I can't seem to get a call to > > > form.accepts(request.vars) to validate it so that I can then act on > > > the data. Am I missing something? > > > > thanks > > > Dan > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

