Anthony,

I've followed this tutorial here: 
http://www.web2py.com/book/default/chapter/07#FORM

my default.py looks like 

def display_form():
    form=FORM('Your name:',
              INPUT(_name='name', requires=IS_NOT_EMPTY()),
              INPUT(_type='submit'))
    if form.accepts(request,session):
        response.flash = 'form accepted'
    elif form.errors:
        response.flash = 'form has errors'
    else:
        response.flash = 'please fill the form'
    return dict(form=form)

and i'm not sure where in there I can assign a variable to run through a series 
of checks. I have a lot of checks I want to run the IP through and compare it 
against our SQL database. I just have to assign the input to a variable first.



On Wednesday, February 5, 2014 10:51:01 AM UTC-5, Anthony wrote:
>
> Yes, it would be in request.vars (and request.post_vars, assuming a post 
> request). Hard to help further without seeing some code.
>
> On Wednesday, February 5, 2014 10:20:35 AM UTC-5, Austin Taylor wrote:
>>
>> This is driving me insane!! I've been trying to create an input field for 
>> a user to type in an IP address.
>>
>> I then want to assign their input to a variable, run it through my IP 
>> checks and return the result from our SQL database.
>>
>> In a nutshell, how can I assign their input to a variable (I'm thinking 
>> request.vars??) and then run it through a series of checks under 
>> myapp/controllers and return the result.
>>
>

-- 
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/groups/opt_out.

Reply via email to