I've set a relationship of "depends on" between a subcategory select and a parent category select (single not multi), but I notice that although the category onchange correctly alters the content of the subcategory select, changing the subcategory select re-fires the ajax and makes subcategory selection impossible. I must be misunderstanding the purpose of the "dependent" type. Once the subcategory options are replaced, I don't want an onchange of the subcategory to retrigger anything.
Comments
$fields['subcategory'] = array('type' => 'dependent', 'depends_on' => 'category', 'url' => '/fuel/products/ajax_subcategories');
The method returned the HTML options.
I'll try using it again and see if I hit the same issue. The url is arbitrary I suppose, the method for populating the sub category options could be in the subcategory model or the products model (or somewhere else) I take it?