Extending QF Select

From: Date: Wed, 22 Dec 2004 12:39:00 +0000
Subject: Extending QF Select
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-16411@lists.php.net to get a copy of this message
I need to create a simple Yes/No select element, but am doing something wrong and QF is creating the element with the number of options doubled (Yes / No / Yes / No). Following is my class; class yesNo extends HTML_QuickForm_select { function yesNo(){
             $options = array('1' => 'Yes',
                        '0' => 'No');        $data = func_get_args();
       parent::HTML_QuickForm_select($data[0], $data[1], $options);
} } and I'm registering it with: $this->registerElementType('yesNo',
                                  'elements/yesNo.element.php',
                                  'yesNo');
Obviously I am doing something wrong. Help appreciated! Aaron

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