I have the following table and validator definitions:
db.define_table('cal_opening_hours',
Field('nodeID', 'reference nd_node', **isnode),
....
migrate = False)
isnode = dict(default='', requires=[IS_IN_DB(db, 'nd_node.id', '%(id)s',
zero='Selecteer een node',
error_message='Node niet in
database')], ondelete='CASCADE',
notnull=True, writable=False, readable=False)
In the insert function I have the following code:
db[table].nodeID.default = nodeID
form = SQLFORM(table, showid=False, hidden=dict(nodeID=nodeID))
I thought this would validate the nodeID, however, when I comment out the
line
db[table].nodeID.default = nodeID the openinghour is inserted without
nodeID.
Why isn't the hidden field being validated?
Kind regards,
Annet
--
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.