HTML_Quick FORM populating default data

From: Date: Fri, 17 Mar 2006 23:10:48 +0000
Subject: HTML_Quick FORM populating default data
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-23328@lists.php.net to get a copy of this message
I am trying to populate data into HTML_quick Form, but it does not like multiple phone numbers. When i try to populate information from DB, everything works fine, except the phone numbers. It populates the last phone number everywhere. After I get the info from the DB, I use
$ClientForm_obj->setDefaults(array('fname'      => $fname,
                                   'lname'      => $lname,
                                   'address1'   => $address1,
                                   'address2'   => $address2,
                                   'city'       => $city,
                                   'state'      => $state,
                                   'zip_postal' => $zip_postal,
                                   'w_phone'    => $some_number1,
                                   'h_phone;    => $some_number2
                               ));
$areaCode = $ClientForm_obj->createElement('text', '', null,
                           array('size'      => 4,
                                 'maxlength' => 3,
                                 'onfocus'   => 'this.style.backgroundColor="f4f4e6"',
                                 'onblur'    => 'this.style.backgroundColor="ffffff"'));
                                 $phoneNo1 = $ClientForm_obj->createElement('text', '', null,
                           array('size'      => 4,
                                 'maxlength' => 3,
                                 'onfocus'   => 'this.style.backgroundColor="f4f4e6"',
                                 'onblur'    => 'this.style.backgroundColor="ffffff"'));
                                 $phoneNo2 = $ClientForm_obj->createElement('text', '', null,
                            array('size'     => 4,
                                 'maxlength' => 4,
                                 'onfocus'   => 'this.style.backgroundColor="f4f4e6"',
                                 'onblur'    => 'this.style.backgroundColor="ffffff"'));
                                $ClientForm_obj->addGroup(array($areaCode, $phoneNo1, $phoneNo2), 'w_phone', 'Work Phone:', ' - ');
$ClientForm_obj->addGroup(array($areaCode, $phoneNo1, $phoneNo2), 'h_phone', 'Home Phone:', ' - ');
$ClientForm_obj->addGroup(array($areaCode, $phoneNo1, $phoneNo2), 'c_phone', 'Cell Phone:', ' - ');
But it keeps populating $some_number2 to all w_phone, h_phone, c_phone ? Y is that ? Thanks Atif K

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