related tables

I have this:

$related['product_colors'] = 'products_to_colors_model';
$related['products'] = 'products_to_products_model';
$related['products'] = 'products_to_made_for_products_model';

$fields = parent::form_fields($values, $related);

As you can see, 2 multiselect widgets populated with the 'products' table. The third relation which is also a $related['products'] doesn't display anything. I guess this is happening because it has the same key than the previous one.
Is there a way to solve this?



  • edited 2:48PM
    You will need to manually create that field in your form_fields method because the $related parameter currently only works with one lookup table and your key value is indeed overwriting the previous one set. To replicate it, you can add something similar as to what is found in the MY_Model::form_fields() method around line 1736, but will need to substitute in your related and lookup models.
  • edited 2:48PM
    Awesome. Thanks!
Sign In or Register to comment.