web2py version: 1.74.6 (2010-01-13 11:12:48)
operating system: Ubuntu 9.10 karmic
database: SQLite

Hi all,

I've got a simple form which is not submitting its data to the
database. Here's the code snippet:

def resources():
    """
    allows add/update/delete for resources
    """
    # form for creating a resource
    form = FORM(TABLE(TR('Name:',INPUT(_type='text', _name='name',
requires=IS_NOT_EMPTY())),
                        TR("Email:",INPUT
(_type="text",_name="email",requires=IS_EMAIL())),
                        TR("Active status:",INPUT
(_type="checkbox",_name="active_status", value=True)),
                        TR("Resource type:",SELECT
('Transcriber','QA',_name="resource_type",requires=IS_IN_SET
(['Transcriber','QA']))),
                        TR("",INPUT(_type="submit",_value="Submit"))))
    if form.accepts(request.vars, session):
        session.flash = 'Resource created successfully!'
        redirect(URL(r=request, f='resources'))
    elif form.errors:
        session.flash = 'Some error occured.'

    return dict(form = form)

When I enter data I see "Resource created successfully!" message
(which means there's no validation failure) but the data is not going
into the database (verified from database administration). Any clue
what might be wrong?
-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to