Dependent dropdown menu in 2 collections

I’m very new in Meteor.I have 2 dropdown menus & I need to make address dropdown show the addresses of the choosen client name… I’ve 2 collecions Customers & Addresses…but, I don’t know how to link the 2 dropdowns with each other

<template name="newAddress">
  <form class="newAddress">
    <h2>New Address:</h2>
      <p>{{> selectClient}}</p>
      <p>Name:<br><input type="text" name="addressName" class="name"
         placeholder="Enter address name.." required> </p>
      <p>Details:<br> <input type="text" name="details" class="address"
         placeholder="Entaer address details.." required></p>
         <br>
      <input type="button" class="create" value="Create" name="create">
    </form>
</template>

<template name="selectAddress">
  Address:
<select class="select" name="Choose the address">
  <option selected disabled>Choose the address</option>
  {{#each address}}
  <option>{{addressName}}</option>
  {{/each}}
</select>
</template>

<template name="selectClient">
    Client Name :
    <select class="select-customer">
        <option selected disabled>Choose client name</option>
        {{#each custom}}
          <option value="clientName">
              {{clientName}}
            </option>
        {{/each}}
    </select>
</template>

var customerId = Customers.insert({
    clientName: clientName,
    age: age,
    gender:radioValue,
    number : mobNumber,
    createdAt: new Date()
    });
    Addresses.insert({
      addressName: addressName,
      detail: detail,
      createdAt: new Date()
    });

Template.selectClient.helpers({
  'custom': function(){
    return Customers.find();
  }
});
Template.selectAddress.helpers({
  'address': function(){
    return Addresses.find();
  }
});

Hey,

I think what you want to do is add address as an array to the Customer field.

I would look into the SimpleSchema package.

You will be able to create a schhema for your customers and your addresses, then add the addess. Something like this:

AddressSchema = new SimpleSchema({
 address:{
    type: String,
    label: "address"
  }
});


CustomerSchema = new SimpleSchema({
  name:{
    type: String,
    label: "Customer Name"
  },
  address:{
    type: Array
  },
  'address.$':{
    type: AddressSchema
  }
});

Customer.attachSchema( CustomerSchema );