# Dropdown based on other selected dropdown value

**URL:** https://community.forestadmin.com/t/dropdown-based-on-other-selected-dropdown-value/1787
**Category:** Help me!
**Created:** [February 5, 2021, 7:36pm UTC](https://community.forestadmin.com/t/dropdown-based-on-other-selected-dropdown-value/1787 "2021-02-05T19:36:23Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Svenjoelsson](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/svenjoelsson/32/1410_2.png) [@Svenjoelsson](https://community.forestadmin.com/u/Svenjoelsson)
#### Post date: [February 5, 2021, 7:36pm UTC](https://community.forestadmin.com/t/dropdown-based-on-other-selected-dropdown-value/1787/1 "2021-02-05T19:36:23Z")

</div>

Hi everyone,

I am new to both NodeJS and ForestAdmin and all that includes, I have done other programming before like, PHP Javascript and jquery so I am not new to programming.

I have one collection of Customer and another one which is called CustomerContacts, both those are linked together so that when entering a customer I can see all the CustomerContacts which belongs to this Customer.

I also have a collection called Cases, and I want to be able to select CustomerContacts based on which Customer i have selected in the drowndown, ergo, I want to only get the CustomerContacts which belongs to the Customer I selected in the Customer dropdown.

I have searched for several days but are not able to find anythings that fits my needs.

The Case collection has relations to Customer and CustomerContacts so that is all done.

**Case collection**

```javascript
const schema = mongoose.Schema({
    'customers': { type: mongoose.Schema.Types.ObjectId, ref: 'customers' },
    'customerContacts': { type: mongoose.Schema.Types.ObjectId, ref: 'customerContacts' },
},{
  timestamps: true,
});

module.exports = mongoose.model('case', schema, 'case');

```

Also, in the Case view I want to show a field from the Customer collection called Instructions, but cant figure out how to do this.

**Customer collection**

```javascript
const schema = mongoose.Schema({
  'name': String,
  'instructions': String,
  'createdAt': Date,
  'customerContacts': [{ type: mongoose.Schema.Types.ObjectId, ref: 'customerContacts' }],
}, {
  timestamps: true,
});

module.exports = mongoose.model('customers', schema, 'customers');

```

Can anyone please help me or atleast point me in the right direction?

Thanks in advance!

---

<div class="post-metadata">

### Author: ![anon62739609](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@anon62739609](https://community.forestadmin.com/u/anon62739609)
#### Post date: [February 9, 2021, 8:57am UTC](https://community.forestadmin.com/t/dropdown-based-on-other-selected-dropdown-value/1787/2 "2021-02-09T08:57:03Z")

</div>

Hi @Svenjoelsson 👋 !

I’ll try to implement a [smart action](https://docs.forestadmin.com/documentation/reference-guide/actions/create-and-manage-smart-actions) with [hooks](https://docs.forestadmin.com/documentation/reference-guide/actions/create-and-manage-smart-actions#making-a-form-dynamic) to see if that could fit your needs 🙂

---

<div class="post-metadata">

### Author: ![Svenjoelsson](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/svenjoelsson/32/1410_2.png) [@Svenjoelsson](https://community.forestadmin.com/u/Svenjoelsson)
#### Post date: [February 10, 2021, 7:54pm UTC](https://community.forestadmin.com/t/dropdown-based-on-other-selected-dropdown-value/1787/3 "2021-02-10T19:54:30Z")

</div>

Hi,

Yea, hooks is what i am looking for, but in the example its just on a smart action.  
How can I implement this on the standard “Add” page while adding a new record?

---

<div class="post-metadata">

### Author: ![GuillaumeGautreau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaumegautreau/32/557_2.png) [@GuillaumeGautreau](https://community.forestadmin.com/u/GuillaumeGautreau)
#### Post date: [February 11, 2021, 8:03am UTC](https://community.forestadmin.com/t/dropdown-based-on-other-selected-dropdown-value/1787/4 "2021-02-11T08:03:16Z")

</div>

Hello @Svenjoelsson,

If you want to achieve that, you’ll have to implement a smart action to add new Cases. The standard add action does not allow such customization.

As explained in the documentation linked by @anon62739609, smart actions can specify forms and you’ll be able to specify the behavior you want to implement.
