PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Database » DB_DataObject_FormBuilder » Bug #3288

New Boolean issue.

Details

Request #3288New Boolean issue.
Submitted2005-01-25 00:58 UTC
Fromrolf at winmutt dot com
StatusOpen
PackageDB_DataObject_FormBuilder
PHP Version5.0.3
OSANY
Roadmaps(Not assigned)

Comments

[2005-01-25 00:58 UTC] rolf at winmutt dot com

Description:
------------
Spoke with Justin about this :

Re : Boolean

I'll issue this as a bug if needed, if a bool is NOT NULL then only a selected status of the checkbox will pass validation. In reality, NULLable booleans should be yes/no radio button and NOT NULL should be a checkbox but not required.

If neither Yes/No (T/F whatever) is not set then it is NULL.

I use this for an "active" (BOOLEAN NOT NULL DEFAULT TRUE) field in most of my tables to preserve old records instead of deleting them.

[2005-01-25 02:08 UTC] rolf at winmutt dot com

sry this is FormBuilder issues

[2005-01-28 01:26 UTC] rolf at winmutt dot com

Yes No None radios buttons perhaps? SOME browsers let you
uncheck a button after its checked. It is not a perfect
fix, but the current setup is incorrect. What happens if
its NOT NULL and the customer leaves it unchecked? The
checkbox does not end up in _REQUEST, leaving the field
NULL. I guess one way to fix this would be to leave the
field as not null and interpret null or false as false.

[2005-01-28 01:34 UTC] rolf at winmutt dot com

Perhaps advcheckbox would be a better start over the
normal checkbox?


'advcheckbox'

Class for an advanced checkbox type field,
HTML_QuickForm_advcheckbox. Basically this fixes a problem
that HTML has had where checkboxes can only pass a single
value (the value of the checkbox when checked).