title: jquery dropdown box based on multiple criteria
body: <p>I am trying to create a dropdown box that show options based on multiple criteria, I have it filtering results based on the selection of the box above it, but I also want it to only show results based on a field in the database.</p>
  
  <p>For example, you want to allocate a payment, you select the customer in the first box, in the second box it shows the branches and in the third box the invoices for that customer, I would like it to show only the invoices for the customer branch selected and then also only the invoices that are not paid.</p>
  
  <p>I have a field in the database "paid", and the value of this field is either 0 or 1.</p>
  
  <p>I am using laravel, and here is the code I currently have:</p>
  
  <pre><code> $(document).ready(function () {
      $("#customer").jCombo("{!! url('admin/payments/comboselect?filter=tbl_customers:id:tradingName') !!}", {
          selected_value: '{{ $row["customer"] }}'
      });
  
      $("#customerBranch").jCombo("{!! url('admin/payments/comboselect?filter=tbl_customerBranches:id:branchName') !!}&amp;parent=customer:", {
          parent: '#customer',
          selected_value: '{{ $row["customerBranch"] }}'
      });
  
      $("#invoice").jCombo("{!! url('admin/payments/comboselect?filter=tbl_invoice:id:invoiceNumber') !!}&amp;parent=customer:", {
          parent: '#customer',
          selected_value: '{{ $row["invoice"] }}'
      });
  });  
  </code></pre>
  
  <p>Any help with this will be greatly appreciated.</p>