Hello,

I setup a form similar to the display form on the tutorial:

def display_form():
    form = FORM('Your name:',
              INPUT(_name='userinput', 
requires=IS_IPV4()),INPUT(_type='submit'))
    if form.process().accepted:
        session.flash = 'form accepted'
        redirect(URL('next'))
    elif form.errors:
        response.flash = 'form has errors'
    else:
        response.flash = 'please fill the form'
    return dict(form=form)

but for some reason it takes ANY user input and runs the redirect function, 
even if there is no user input.

How could I have the input validated and then perform a redirection if it 
approved. I thought that is what the form.process().accepted was for.



-- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to