Re: QF Checkbox value setting

From: Date: Fri, 24 Oct 2003 13:33:17 +0000
Subject: Re: QF Checkbox value setting
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-8559@lists.php.net to get a copy of this message
<mikeatwork@ukonline.co.uk> wrote : > Hi, > > In a bit of a confuddle with setting a more unique value for when a checkbox > is selected on a quickform. > > Using: > $this->addElement('checkbox', $key, $language['L_'.ucfirst($value)], > '')); > > I get: > <input name="1GZc" type="checkbox" value="1" > id="qf_fcfe58" /> > > If I then try to force set a value using: > $this->addElement('checkbox', $key, $language['L_'.ucfirst($value)], > '', > array('value' => 'arse')); > > I get: > <input value="1" name="1GZc" type="checkbox" > id="qf_fa141d" /> > > Why is my value not set to 'arse' ? Something is over riding it to '1' > still? Is this a bug? That's the way checkboxes in QuickForm work. You check whether they are checked or not. That's enough for almost every case. If you need something more, look at advcheckbox element. Bertrand Mansion Mamasam

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