SQLFORM.accepts(...) could use hooks: onaccept, oncreate, onupdate.

onaccept: called after FORM.accept and immediately before create() or
insert()
oncreate: called after create()
onupdate: callled after update()

These hooks could be used by t2 and passed to SQLFORM:
t2.update(onaccept=...,onupdate=...)
t2.create(onaccept=...,oncreate=...)

The important difference is that onaccept must be called after accept
passes, but before the record is updated/inserted, so the user can
modify attributes (set stamps, set incremental ids, etc) before saving
the record.

For t2 to properly support onaccept= is must be supported by SQLFORM.

Thoughts?

Robin




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to