This is the table definition:
db.define_table('school_session',
Field('school_session', 'reference session_master'),
Field('admission_number', 'integer', notnull=True),
Field('class_name', 'reference class_master'),
Field('roll_number', 'integer', notnull=True))
This is the controller
db.school_session.admission_number.writeable = False
db.school_session.admission_number.default = admission_number
form = crud.create(db.school_session)
I want to prevent the user from changing the field 'admission number' when
the form is displayed as it is already being supplied with a validated
default value.
I thought that this code would work.
db.school_session.admission_number.writeable = False
How do I go about it?
--
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/groups/opt_out.