MobileBlur at [eba4a35a21]
Login at [eba4a35a21]

File applications/examples/controllers/ artifact 89768d6d15 part of check-in eba4a35a21

def form():
    """ a simple entry form with various types of objects """

    form = FORM(TABLE(
        TR('Your name:', INPUT(_type='text', _name='name',
        TR('Your email:', INPUT(_type='text', _name='email',
        TR('Admin', INPUT(_type='checkbox', _name='admin')),
        TR('Sure?', SELECT('yes', 'no', _name='sure',
           requires=IS_IN_SET(['yes', 'no']))),
        TR('Profile', TEXTAREA(_name='profile',
           value='write something here')),
        TR('', INPUT(_type='submit', _value='SUBMIT')),
    if form.accepts(request.vars, session):
        response.flash = 'form accepted'
    elif form.errors:
        response.flash = 'form is invalid'
        response.flash = 'please fill the form'
    return dict(form=form, vars=form.vars)