apologies as there might be issues with the callback function (recurrent
calls...)
here a better receipt based on SQLFACTORY:
(1) in your controller create a list a fields like this :
repeats = Field('repeats', 'integer', ......add your validators here)
fields = [repeats , db.evento.titolo, db.evento.inizio......add all evento
fields here...]
note that repeats is a foreign field (doesn't belong to db.evento). it will
tell the indice of event repetition :
repeats=0 first occurence
repeats=1 first repeats
repeats=2 second repeats etc....
create the corresponding labels dict and
write the form variable like this :
form = SQLFORM.factory(*fields, labels=..., table_name=...)
(2) in the form processing section write something like :
if form.process(onvalidation=validateMyEvento, dbio=False).accepted:
for i in range(form.vars.repeats):
--
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.