title: How to filter a relation_n_n multiselect via a dropdown relation field
body: <p>I have four tables:</p>
  
  <p><strong>items</strong></p>
  
  <pre><code>*item_id*
  vendor_id
  title
  </code></pre>
  
  <p><strong>vendors</strong></p>
  
  <pre><code>*vendor_id*
  title
  </code></pre>
  
  <p><strong>vendor_locations</strong></p>
  
  <pre><code>*location_id*
  title
  </code></pre>
  
  <p><strong>vendors_vendor_locations</strong></p>
  
  <pre><code>vendor_id
  vendor_location_id
  priority
  </code></pre>
  
  <p>This is my controller:</p>
  
  <pre><code>$crud-&gt;set_theme('datatables');
  $crud-&gt;set_subject('Items');
  $crud-&gt;set_table('items');
  $crud-&gt;set_relation('vendor_id', 'vendors', 'title');
  $crud-&gt;set_relation_n_n('Locations', 'items_vendor_locations', 'vendor_locations', 'item_id', 'vendor_location_id', '{location_title} {country} {city}', 'priority');
  </code></pre>
  
  <p>How do I filter the relation_n_n depending on selection i made via vendor? For example: I select vendor 30 and the locations are filtered only showing locations of vendor 30 instead of all locations. I guess this is accomplished with the callback functions. Can anyone give me example or general direction how to do this?</p>