Re: Pending patch to some "CheckBoxField" issue
Martijn Faassen <[email protected]> Mon, 26 Jul 2004 17:02:15 +0200
| Newsgroups | gmane.comp.web.zope.formulator.devel |
|---|---|
| Message-ID | <[email protected]> |
Clemens Robbenhaar wrote: > Hi, > > a few weeks ago I have written about the pending "CheckBox" patch at: > > http://sourceforge.net/tracker/index.php?func=detail&aid=952128&group_id=27810&atid=391592 > > (This one solves the issue that after submitting a form, which > contains a checkbox that defaults to true, any unchecking of the box > will be lost on form display): > > [...] > > The other problem is that this patch seems not to fix the issue in the > > case where not the complete form is rendered by formulator, but only its > > fields (by looping over all fields). I guess rendering the fields > > separately is the more common use for Formulator now, as this allows to > > put layout in between the fields. If this happens, the hidden > > "formulator_submit" field will not be present. (At least I guess it is > > not, I admit that I did not really test this.) > > > > I remember loosely there has been some discussion about this issue > > (but not the current patch) in the context of Silva, but I failed to > > remember if there has been some conclusion about it. > > > > After thinking a while about it I tend to apply the patch anyway, as: > > - it fixes the issue if the the form is rendered by form.render() > > - if the initial "<form>" tag is not rendered by formulator, thus the > hidden field is not mangled into the form, it will just do nothing; > i.e. I do not think it makes things worse. Well, it will make the code harder to follow and the conditions more complicated. But if there is truly no better way to solve this.. Regards, Martijn