I am having two relations first one category/second one product and the roduct relation contains the foreign key from the category relation. in my add template of product I wan to have a dynamic dropdown to select form categories. Right now I'm using this way.
$crud->field_type('cat_id','dropdown', array('1' => 'Boxes', '2' => 'Supliments'));
but its is creating a static dropdown. As if any new category is added it doesn't reflect change over here and if i don't specify this I get a simple input field where I have to specify category myself. Right now I am using bootstrap theme. Is there any way I can create a dynamic dropdown.