def index(): if 'file' in request.var: db.records.url.requires=IS_NOT_EMPTY() else: db.records.file.requires=IS_NOT_EMPTY() form = SQLFORM(db.records) ....
On Sunday, 21 July 2013 13:11:40 UTC-5, K. Antonis Tzorvas wrote: > > i have a table: > > db.define_table('records', Field('file', 'upload'), Field('url', 'string')) > > and i want either "file" or "url" to be filled, cases that both are empty > or filled should not pass. > > any idea on how to implement this one? > -- --- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.