Disable a value in 2nd dropdownlist when the same is selected in 1st dropdownlist

Hello:

I’m doing an inventory app in which you can “transfer” products from one warehouse to another.

Right now I’m using 2 dropDownList to select origin and destination warehouse respectively, but how do I do to disable the origin warehouse in the destination list, once it is selected?

Becuase obviously the app should deny a transfer to the same warehouse.

Thank you!

Hello, anyone know how I can handle this?

Thanks!

My suggestion is to only add options to the destination dropdown after the origin one is selected, you can use an ajax request to perform this. Not sure if it is the best way, but it’s a solution :) hope it helps

Thank you, I’ll investigate about ajax requests.

Rgds.