2008/10/31 Michele Beltrame <[EMAIL PROTECTED]>:
> Hi Juergen!
>
>> 3. add the suggested "default_if_unchecked" to formfu
>
> On secondo thought, this might not be a good idea. A checkbox, by
> definition, doesn't have a value if unchecked. If you have a:
>
> <input type="checkbox" value="1" />
>
> it's either "1" or nothing at all (undefined). The "empty_if_unchecked"
> thing is useful for testing, for instance, in when-constrained
> constraints, so is a good idea. As far as setting a value like "0",
> which doesn't really belong to the checkbox, I'm unsure.
>
> Transformers are probably the best way to go, in this case.

I would tend to agree with this assessment.

You'll still need to set default_empty_value(1) to ensure the
processors run on that field.

Carl

_______________________________________________
HTML-FormFu mailing list
[email protected]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

Reply via email to