Yes, I realize that, but I think it makes more sense to control the checked state independent of the value. This is the way that it's done in HTML, where there is a separate attribute for 'checked'. Having direct access to this via htmlfill would be more convenient, and consistent with the behavior when there is no value attribute present.
-Hollister On Oct 11, 12:54 pm, Piotr Kęplicz <[email protected]> wrote: > Hollister, poniedzia³ek 11 pa¼dziernika 2010 18:36: > > > When rendering a checkbox with a value, the checked attribute it not > > > being set: > > >>> from formencode import htmlfill > > >>> htmlfill.render("""<input type="checkbox" name="cbox" > > >>> value="1">""",{'cbox': True}) > > '<input type="checkbox" name="cbox" value="1">' > > I'd say it's correct. Input value is "1", not True. > > >>> htmlfill.render("""<input type="checkbox" name="cbox" value="1">""", > > {'cbox': 1}) > '<input type="checkbox" name="cbox" value="1" checked="checked">' > > .pk. -- You received this message because you are subscribed to the Google Groups "pylons-discuss" 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/pylons-discuss?hl=en.
