baxi2990
baxi2990

Reputation: 13

Dropdown dependents agile toolkit

Hello friends a pleasure to be around here, I'm new to this framework and I have a few doubts about how to make dependent dropdown, for example, I have a list of countries and select a country to show me their states hope I can help from already thank you very much.

Upvotes: 0

Views: 568

Answers (2)

gsteenss
gsteenss

Reputation: 68

Could it be that above example (http://demo39.agiletoolkit.org/demo.html?t=20) only works when the arrays have numbers for their dropdown values? ie:

$country_list=array(1=>'Country1', 2=>'Country2')
$state_list=array(1=>array('st1','st2'),2=>array('st3')

night it be the demo will not work when using:

$country_list=array('COUNTRY1'=>'Country1','COUNTRY2'=>'Country2')
$state_list=array('COUNTRY1'=>array('ST1'=>'st1','ST2'=>'st2'),'COUNTRY2'=>array('ST3'=>'st3')

with the second setup I get an error at form submit time saying:

Value 'ST3' is not one of the offered values

or am I doing something else wrong? should I (not) use stickyGET for instance?

Upvotes: 0

romaninsh
romaninsh

Reputation: 10664

Here is a demo of what you're looking for:

http://demo39.agiletoolkit.org/demo.html?t=20

Upvotes: 1

Related Questions