Source for file checkbox.php
Documentation is available at checkbox.php
* @author Stuart Prescott
* @copyright Copyright Stuart Prescott
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @subpackage FormsLibrary
/** Load ancillary functions */
require_once 'inc/typeinfo.php';
/** field parent object */
require_once 'field.php';
* @subpackage FormsLibrary
* Create a new checkbox object
* @param string $name the name of the field (db name, and html field name
* @param string $longname long name to be used in the label of the field in display
* @param string $description used in the html title or longdesc for the field
function CheckBox($name, $longname=
'', $description=
'') {
parent::Field($name, $longname, $description);
$errorclass =
($this->isValid ?
'' :
"class='inputerror'");
$t =
"<tr $errorclass><td>$this->longname</td>\n"
$t .=
"<input type='hidden' name='$this->namebase$this->name' "
for ($i=
0; $i<
$cols-
2; $i++
) {
$t =
"<input type='checkbox' name='$this->namebase$this->name' "
$t .=
(($this->getValue()) ?
'checked="1"' :
'');
Documentation generated on Tue, 06 Mar 2007 10:01:01 +0000 by phpDocumentor 1.3.0