I have a form, which I would like to use dependent drop downs in. I can't
seem to find anything about it hear, after looking all morning trying to
work it out.
I have one field "race_country"
when an option is selected I would like to show the cities in that country.
The following is what I have currently in the form, which will show all
countries and all cities.
Any help would be great. thanks

$table = new Country();
foreach ($table->fetchAll() as $c) {
    $country->addMultiOption($c->country_id, $c->country_name);
}
 $this->addElement( $country);
  
 $city = new Zend_Form_Element_Select('race_city');
$city->setLabel('City')
         ->setRequired(true);
 
$table = new City();
foreach ($table->fetchAll() as $c) {
    $city->addMultiOption($c->city_id, $c->city_name);
}
 $this->addElement( $city);
-- 
View this message in context: 
http://www.nabble.com/How-to-set-up-dependant-dropdowns-in-form-tp20907379p20907379.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to