Hello
For dependent dropdowns I use gc_dependet_select library by Victor (amazing library)
But I'm not sure if I can do the following:
I have this database structure:
COUPONS coupon_id user_id category_id ... USERS user_id city_id ... CATEGORIES category_id city_id ...
$fields = array( // first field: 'user_id' => array( // first dropdown name 'table_name' => 'users', // table of country 'title' => 'username', // country title 'relate' => null // the first dropdown hasn't a relation ), // second field 'category_id' => array( // second dropdown name 'table_name' => 'categories', // table of state 'title' => 'name', // state title 'id_field' => 'category_id', // table of state: primary key 'relate' => 'city_id', // table of state: 'data-placeholder' => 'Select users first' //dropdown's data-placeholder: ) );
I would like to generate a dependant dropdown in COUPONS, where I select the users first and then the categories with the same city_id as the user selected.
It's possible?
Thanks in advance