Again, thank you for continuing to support this project through this forum!
I think I'm overlooking something simple. I'm trying to allow someone to edit from both sides of a 1-n relationship (set_relation). For example, the Grocery Crud demo of Employees has a relationship to the Office City. You can easily view a list of all employees, edit an employee and change the Office City from a drop down.
Demo: Employees - Office City
http://www.grocerycrud.com/documentation/options_functions/set_relation
$crud->set_relation('officeCode','offices','city');
But, if you created a list view of Office Cities (or Offices), edit a Office City... there's no way to edit the related Employees to that Office City. What's the best way to create this multi-select drop down (chosen plugin) field? I assume I would need to write my one model after save callback to save the relationship data properly.
n-n relationship?
I noticed that the n-n relationship allows you to edit from both sides of the relationship; as expected. Should I setup a related table and just use a n-n relationship instead? It's not really a n-n, as an Employee can only belong to one Office City (at least in my issue). Not using the proper relationship bothers me a bit. How can I then prevent an Employee from being added to Multiple Cities? Custom add/edit Validation rules?
Am I missing something?
Thanks, Jeff