Ace Paul wrote:
> 
> 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);
> 

Does anyone have a complete example of this?

I used this example to get it up and going:
http://techchorus.net/autocomplete-example-zenddojoformelementfilteringselect-and-zenddojodata

With the change located in the comments:
<div dojoType="dojo.data.ItemFileReadStore" url="/strain/list"
jsId="strainStore"></div>

but I am having trouble trying to do dependent drop downs. Any good
references out there, or is this too early to attempt with Zend &  Dojo?

-- 
View this message in context: 
http://www.nabble.com/How-to-set-up-dependant-dropdowns-in-form-tp20907379p23259776.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to