Hi,
I've been trying to validate and display the form variables in the
sample code below but failed.
-------------------------------------------------------------------------------------
def emplogin():
    response.menu =[
    ['Home', False,t2.action('home')],['Sign In',False,t2.action('')]]
    response.flash = "Please Sign In to access
eServices."
    form = FORM(TABLE(TR("Id No.:", INPUT(_name="idno",requires=
[IS_NOT_EMPTY()])),\
                     TR("", INPUT(_name="submit", _type="submit",
_value="Sign In"))))

#  The form test below failed, meaning if "idno" is True or has errors
then
#  corresponding messages should be shown. Unfortunately only the
#  "Please sign in..." message is displayed after "idno" is inputted
and submitted or #   resubmitted.

    if form.accepts(request.vars, session):
        response.flash = "Form accepted. %s" %(form.vars.idno)

    elif form.errors:
        response.flash='Form not accepted.'
        link1=A('register',_href=URL
(r=request,f='register'))
    return dict(Employee=form)
-----------------------------------------------------------------------------------------------
Checked the FORM code but failed to see potential problems. Please
help. Thank you in advance.
ed
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to