It's a fundamental HTML form issue.  No matter what the name of the
field (e.g. even if it has a ':boolean'), if the checkbox is not
checked then the input is not included in the request (so the value
won't be changed).  It may be possible to use a hidden field with a
False value, so that something is always submitted.  IIRC Zope will
interpret two fields with the same name as a list of values (even
without ':list').  So a hidden field that is False and a checkbox that
is checked will give [False, True] which will evaluate to True in a
boolean context, but an unchecked checkbox and a hidden False value
will just give the False value from the hidden field.  If that doesn't
work, then I think js is the only way to do this without introspecting
the schema to see what boolean fields may have been missing from the
form.

Alec

On 3/23/07, Alexander Limi <[EMAIL PROTECTED]> wrote:
On Fri, 23 Mar 2007 14:40:46 -0700, Geir Bækholt · Plone Solutions
<[EMAIL PROTECTED]> wrote:

>
> On 23. mar. 2007, at 13.03, Wichert Akkerman wrote:
>
>>> Who removed JS from checkboxes when?
>>
>> I did that, it worked correctly for me (and the old javascript did not
>> work with in-place edit iirc). I haven't tested why it doesn't work for
>> alex.
>
> I believe this is just a matter of adding hooks for the zope-typecasting
> syntax :boolean and it'll work again.

That's what we thought too (and I believe that was what was done), and it
doesn't work. If you can prove otherwise, please do.

--
Alexander Limi · http://limi.net


_______________________________________________
Framework-Team mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/framework-team


_______________________________________________
Framework-Team mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/framework-team

Reply via email to