[web2py] Re: form checkbox keepvalues

2012-09-13 Thread Peter
Hi, I have this: tuple1 = [] for k in data.domain.attributes: tuple1.append(k.name) form = FORM(TR(SELECT(_name='search_category_1', *[OPTION(tuple1[i], _value=i) for i in range(len(tuple1))]), value=request.vars.search_category_1), TR("",INPUT(_type="text"

[web2py] Re: form checkbox keepvalues

2012-01-16 Thread niktar
Thanx, Massimo! It works! But why not just set keepvalues=True? I thought this should be sufficient.

[web2py] Re: form checkbox keepvalues

2012-01-12 Thread Massimo Di Pierro
 INPUT(_type='checkbox', _name='mychkbx', _id='mychkbx', value=request.vars.mychkbx) should do it. On Jan 12, 3:19 am, niktar wrote: > Hi! > I'm trying to create a form that would have keep the entered value of the > checkbox, but the value always is set to false. > > def form(): > > >     form=