According the book I have added a field to a SQLFORM using the following
code:
form_chg_entity = SQLFORM(db.entity, showid=False, record =
session.sif.id, deletable = False, fields= form_fields )
option_conversations = [OPTION(conv.subject, _value=conv.id) for conv
in db((db.conversation.entity==session.sif.id)
&(db.conversation.community==session.com.id)
).select()]
option_conversations.insert(0, OPTION("", _value=0))
justify_entity = TR(LABEL('Change based on'),
SELECT(_name='conversation', *option_conversations))
form_chg_entity[0].insert(-1, justify_entity)
However
if form_chg_entity.process(formname='change_entity').accepted:
....
Gives an error :
<type 'exceptions.AttributeError'> 'Table' object has no attribute
'conversation'
What is going wrong?
Richard D
--
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.