I would like someone to help me with the syntax. I want to show pre-
selected values in a multiple checkbox form and want to insert this
"if condition" in my FORM stmt.
resist = ['A', 'B', 'C', 'D']
r = ['B', 'C']
if r == a.name: status="True" # condition to be included
#FORM stmt
TR("Resistances:", *[TD(x.name, *[INPUT(_type="checkbox",
_name="resist_mult",_value=x.name, value=status) for r in
a.resist_mult.split('+')]) for x in db().select(db.resist.ALL)]),
Kindly let me know if you can do this or have any other solution.
thanks,
Seb
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---