Re: HTML_QuickForm2: value of unchecked checkbox
| From: | Christian Weiske | Date: | Fri, 11 Jun 2010 17:11:54 +0000 |
| Subject: | Re: HTML_QuickForm2: value of unchecked checkbox | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-53557@lists.php.net to get a copy of this message | ||
Hello devs,
> HTML forms always had the problem that checkboxes get not submitted
> when they are not checked. This leads to E_NOTICEs in the best or
> program errors in the worst case if this cases are not checked
> properly.
>
> I think QF2 should make programming with forms easy, and that means
> that the value of a checkbox should be either boolean true or false -
> no matter what the HTML form specifics say.
>
> This could be solved in two ways:
> 1) adding a hidden field before the checkbox, with the same name and
> value of "0"
> 2) programmatically fix the value when using getValue().
>
> Thoughts?
Any ideas on this?
--
Regards/Mit freundlichen Grüßen
Christian Weiske
-=≡ Geeking around in the name of science since 1982 ≡=-
Attachment: [application/pgp-signature] signature.asc
Attachment: [application/pgp-signature] signature.asc