On Mar 30, 7:00 pm, DJ <[email protected]> wrote: > 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']
Maybe something like: p=[INPUT(_type="checkbox",_name="resist_mult",_value=x,value=x in r) for x in resist] <input name="resist_mult" type="checkbox" value="A" /> <input checked="checked" name="resist_mult" type="checkbox" value="B" / > <input checked="checked" name="resist_mult" type="checkbox" value="C" / > <input name="resist_mult" type="checkbox" value="D" /> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

