HTML_QuickForm | the saga continues | putting checkboxes into a group and their default value

From: Date: Wed, 10 Dec 2003 21:57:21 +0000
Subject: HTML_QuickForm | the saga continues | putting checkboxes into a group and their default value
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-9465@lists.php.net to get a copy of this message
greetings, I have, for the moment, hacked around my issues by using 'advcheckbox' instead of plain 'checkbox'. I am using HTML_QuickForm v3.2 as per previously. I have the following code snippet, which uses 'checkbox', and which seems to work fine: <http://radio.zoidtechnologies.com/tunebox/foo.php> (source available from the .phps file). now, for the 'real' code, called 'track.php', I cut-and-pasted the working code from foo.php into the right place. whenever I access the track page in 'add' mode (i.e. nothing being loaded from the database), it *works* in that all of the checkboxes are marked 'off', which is what I expect. when I access the page in 'edit' mode, however (with a record being loaded from the database), all checkboxes are *on* despite my best efforts to the contrary-- all of the booleans coming from the database are 'f' and as far as I know my code is detecting this and setting the defaults to "False". now for the weird bit: the problem goes away when I use advcheckbox. perhaps I am initializing something wrong (quite likely at this point), but I've been struggling for a couple of days on this issue, and I'd just as soon fix it 'properly' vs. using advcheckbox if at all possible-- I'd rather not require javascript just for this one set of elements. the version of track.php that I am using is available in source form from here: <http://radio.zoidtechnologies.com/tunebox/track.phps>. note that a lot of the code in track.phps has been commented out-- I stripped down the code to the bare minimum to try and track down the issue without success (until I tried advcheckbox, that is). note that I have not yet tried to process the data-- that's another issue entirely. any pointers to ways to get this code to function better are most appreciated. regards, J

« previous php.pear.general (#9465) next »