| ##Contact form example
db.define_table('contact_form',
#Field('unread', 'boolean', readable=False, writable=False, default=True,label=T('Unread')),
#Field('todo', 'boolean', readable=False,writable=False, default=False, label=T('To Do')),
Field('your_name', label=T('Name')),
Field('your_email', requires=IS_EMAIL(), label=T('Email')),
Field('your_phone_number', label=T('Phone number')), # requires=IS_MATCH('[\d\-\+\(\)\.\ ]+'),
Field('client_ip','string',readable=False, writable=False, default=request.client),
Field('subject', label=T('Subject')),
Field('message', 'text', label=T('Message')),
Field('private_comment','text', readable=False, writable=False,label=T('Private Comment')),
format='%(your_name)s'
)
|