Re: HTML_Quickform not working with two hierselects
| From: | Alexey Borzov | Date: | Wed, 07 Mar 2007 15:46:37 +0000 |
| Subject: | Re: HTML_Quickform not working with two hierselects | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-26763@lists.php.net to get a copy of this message | ||
Hi,
Jose Manuel Zea Ginerÿffffffffffe9s wrote:
Alexey: The PHP version is 5.1.6.
Mark: this is the php code:
I call these functions inside an descendant object from HTML_QuickForm:
$name_element = 'codprovinciacodmunicipiocodzona';
$localizacion = &$this->addElement('hierselect', $name_element, $label,'',''); $localizacion->setOptions(getArrayLocalizacionCompleto($first_table, $last_table));
//getArrayLocalizacionCompleto is a function that returns the array with the values
$tipos_subtipos = &$this->addElement('hierselect', INM_TABLE_codtipo.INM_TABLE_codsubtipo, $tr->get(INM_TABLE_codtipo.INM_TABLE_codsubtipo, 'forms'),'','');
$tipos_subtipos->setOptions(array($tiposInmueble, $subtiposInmueble));
This is it! Thanks for your help.
You probably have some problems with your options arrays then. Specifically, you may have option(s) for the first select that don't have corresponding options in the second select. Is this the case?