On Saturday, 16 March 2013 19:11:13 UTC+11, Niphlod wrote:
>
> on the ajax/js side .... code a component and LOAD(ajax=True) multiple
> times with different parameters ?
Perhaps it is time for me learn about this :)
The SQLFORM approach gives me all the SQLFORM validation and default widget
goodness, I'm not sure how hard this with components.
I haven't yet tacked the layout of the SQLFORM, but this snippet is getting
close to what I want and it's only a few lines.
client_id = request.args[0]
query = (db.client_activity.client == client_id)
forms = {}
for r in db(query).select():
form_name = 'form' + str(r.id)
forms[form_name] = (SQLFORM(db.client_activity,record=r))
if forms[form_name].process().accepted:
response.flash = 'form accepted'
elif forms[form_name].errors:
response.flash = 'form has errors'
--
---
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.