i used this:
db.define_table('test',
Field('service_type'))
def form1():
db.test.service_type.requires=IS_IN_SET(['Trial'])
form = SQLFORM(db.test)
if form.process().accepted:
pass
return dict(form=form)
def form2():
db.test.service_type.requires=IS_IN_SET(['one month','one year'])
form = SQLFORM(db.test)
if form.process().accepted:
pass
return dict(form=form)
but this is not working, when you open form1 and then form2 and then submit
form1 it is not saving any data.
so db.test.service_type.requires=IS_IN_SET(['one month','one year']) is not
creating an instance for this form but setting that requires for all forms,
how to solve it?
--