Controller:
newform=SQLFORM(docs.docs,uploadfield=True, \
fields=['supplier','supplierID'])
if newform.accepts(request.vars,session):
response.flash = "Data accepted"
return dict(form=newform)
I acquire the supplierID as a dropdown using this in the model --
docs.docs.supplierID.requires=IS_IN_DB(dbhlx
(dbhlx.contact.category=='supplier'),dbhlx.contact.contactid,\
'%(contactid)s')
The contactid's provided from a different db. All works fine.
Without using Crud, is there a means to populate the supplier field
before form.accepts() is executed? Slipping in some print statements I
notice that request.vars are, one state before submit and one state
after submit.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---