Hello,
I need validated input from user in a particular field. The input entered
by user must not contain any SPACES. I can do this in javascript by using
onkeypress function but how to do this using SQLFORM.
My code in default.py is as under:
form=SQLFORM(db.complain,fields=['Description','Topic','Email','CurrentTime'])
if form.process().accepted:
response.flash='Complain Registered. ID is: '+ str(form.vars.id)
Database is:
db.define_table('complain',
Field('Description',length=200, required=True,requires=IS_NOT_EMPTY()),
Field('Topic',length=10, required=True,requires=IS_NOT_EMPTY()),
Field('Email', required=True,requires=IS_EMAIL()),
Field('Status',length=10, writable=False,default='In-Process'),
Field('CurrentTime','datetime',default=request.now,writable=False))
--
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/d/optout.