Hi,
I am new to web2py and trying to learn some basic features but facing prob.
I would like to create select button and store its selected value in a
variable so that I can use in other function. Also I don't want to create
submit button for select button. Is it possible to store selected values
in a variable?
Below are codes which I was trying to implement but it is not working.
def index():
protease = FORM('Select proteases:',SELECT(['Ram', 'Satish', 'Kumar',
],_name="protease"),INPUT(_value=request.vars.protease,_type='hidden'))
session.protease = protease.vars.protease
uniprot = FORM('Uniprot ID:',INPUT(_name='uniprot',
requires=IS_NOT_EMPTY()),
INPUT(_type='submit'))
if uniprot.process(formname='uniprot').accepted:
session.uniprot = uniprot.vars.uniprot
redirect(URL('result'))
return dict(uniprot=uniprot, protease=protease)
Thanks
--
---
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.