INPUT(_type='checkbox', _name='mychkbx', _id='mychkbx', value=request.vars.mychkbx)
should do it. On Jan 12, 3:19 am, niktar <[email protected]> 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=FORM(LABEL('My Checkbox:', _for='mychkbx'), > > INPUT(_type='checkbox', _name='mychkbx', _id='mychkbx'), > > INPUT(_type='submit', _value='OK')) > > if form.accepts(request, session, keepvalues=True, dbio=False): > > response.flash="form accepted" > > elif form.errors: > > response.flash="form is invalid" > > else: > > response.flash="please fill the form" > > return dict(form=form) > > How do I create a form that keep the value of checkbox?.

